Quick actions

cmd+k|ctrl+k

Navigation

Languages

3. if else block

Snippet info

Language

Python

Visibility

public

Author

aaron.lung.wai

Created

2022-11-23T14:05:42.982664Z

Updated

2024-04-08T01:54:46.78016Z

x = 4
y = 4
if x < 5:
    print("x is greater than 5")
else:
    print("x is less than 5")

if y > 5:
    print("y is less than 5")
else:
    print("y is greater than 5")


z = [1,4,7,10]
z = tuple(z)
print(     type(z))
z=2,3,4
if len(z) >= 2:
    print("z is a long list")
else:
    print("z is short list")
INFO