The if-else statement handles two sides of the same condition: True and False. This works very well if we’re working with a problem that only has two outcomes.
However, in programming, it isn’t always a True or False scenario, and a problem can have multiple outcomes.
This is where the if-elif-else statement shines. It is the most comprehensive conditional statement because it allows us to create multiple conditions easily.
The elif stands for else if, indicating that if the previous condition fails, try this one.