if else syntax python3 code example
Example 1: else if python
if expression1:
statement(s)
elif expression2:
statement(s)
elif expression3:
statement(s)
else:
statement(s)
Example 2: python if elif
num = 20
if num > 30:
print("big")
elif num == 30:
print("same")
else:
print("small")
#output: small