Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Code Example of Checking if a variable is None using == operator

# Declaring a None variable
var = None

if var == None: # Checking if the variable is None
  print("None")
else:
  print("Not None")
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Code #Example #Checking #variable #None #operator
ADD COMMENT
Topic
Name
2+5 =