Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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

# Declaring a None variable
var = None

if var is 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
9+8 =