Quick actions

cmd+k|ctrl+k

Navigation

Languages

If-else

Snippet info

Language

Python

Visibility

public

Author

ak.amita28

Created

2026-04-21T10:21:10.069044Z

Updated

2026-04-21T10:23:41.006702Z

switch_blue = False
switch_red = False

if switch_blue : 
    print('My name is Amita')
elif switch_red :
    print ('My name is Tej')

else: print('My name is Rudra')

# else if with operator

colour_red = True
colour_blue = True

if colour_red and colour_blue :
    print ('Rudra is lovely child')
INFO