Quick actions

cmd+k|ctrl+k

Navigation

Languages

Sets

Snippet info

Language

Python

Visibility

public

Author

rajib-016

Created

2026-01-24T07:37:54.714868Z

Updated

2026-01-26T09:24:29.82382Z

is_old = False
is_licenced = True

if is_old:
    print('I am old enough to drive')
    
elif is_licenced:
    print('you can drive now')
    
else:
    print('you are not of age')
    
print('okok')










#############################
is_old = True
is_licenced = True

if is_old and is_licenced:
    print('I am old enough to drive!')
    
else:
    print('you are not of age!')
    
print('okok')



#Ternary Operator

#condition_if_true if condition else condition_if_false

is_friend = True
can_message = 'Message Allowed' if is_friend else 'not allowed to message'
print(can_message)





#Short Circuting
is_Friend = True
is_User = True

print(is_Friend and is_User)

if is_Friend and is_User:
    print('best friend forever')
    
if is_Friend or is_User:
    print('best friend forever')
INFO