Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if statement in python

can_run = True
can_run2 = False

if can_run:
    print("i can run the code because can_run is true")
    
elif can_run2:
    print("i can run the code if can_run2 is true")
    
else:
    print("no other bool found true")
    

#result should be (i can run the code because can_run is true
Source by www.askpython.com #
 
PREVIOUS NEXT
Tagged: #statement #python
ADD COMMENT
Topic
Name
3+4 =