In this example we will show how to use both the elif keyword and the else keyword in Python.
Source Code
x = 20
y = 8
if x > y:
print('x is greater than y')
elif x == y:
print('x and y are equal')
else:
print('x is not greater than y')
Output:
x is greater than y