Quick actions

cmd+k|ctrl+k

Navigation

Languages

Conditionals

Snippet info

Language

Python

Visibility

public

Author

akaimal04

Created

2024-12-26T19:33:24.354905Z

Updated

2024-12-26T19:33:24.354905Z

can_drive = False
can_fly = True

if can_drive and can_fly:
    print("do you want to drive or fly")
    print("whatever you want")
elif can_drive or can_fly:
    print("you can travel but only one or the other!")
else:
    print("don't travel pls")
    
    
# ternary operator
is_friend = True
can_dm = "dm allowed" if is_friend else "dm not allowed"
print(can_dm)

INFO