The elif statement permits you to check multiple expressions for truth value and execute a block of code the moment one of the conditions estimates to true.
similar to the else, the elif statement is optional. Though, unlike else, for which there can be at most one statement, there can be an arbitrary number of elif statements next an if.
The syntax of the if...elif statement is:
if expression first:
statement(s)
elif expression second:
statement(s)
elif expression third:
statement(s)
else:statement(s)