Quick actions

cmd+k|ctrl+k

Navigation

Languages

if then else

Snippet info

Language

Python

Visibility

public

Author

atkincheung

Created

2024-09-26T12:40:15.968079Z

Updated

2024-09-26T13:15:39.840117Z

x = 0
if print("x is something"):
    print("x is larger than 0")
elif x==1:
    print("x is equal to 1")
else:    
    print("x is larger than 1")
print("this line is out of if block") 

if tuple():
    print("false")
else: 
    print("true")
 
x=-11   
if ((x<0) & (x<-5)):
    if x<-10:
        print("x is less than -10")
        print("x is less than 0")
    elif x==1:
        pass
    print("x is equal to 1")
    
    
INFO