Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

check boolean python


a = True # dont forget capital T and F, it is case sensitive
b = False

if b == True:
  print("b is true")

if b:
  print("b is true") # this is the shorthand of the above IF statement
  
if b == False:
  print("b is false") # again dont forget True and False are case sensitive
  
 
PREVIOUS NEXT
Tagged: #check #boolean #python
ADD COMMENT
Topic
Name
2+3 =