♦ Python If Elif Else
♣ About Python If Elif Elseif, elif, and else are conditional statements.
Deterministic decisions can be made through these literals.
Compares two same/different Data Types over operators, such as:-
- Greater Than: a > b
- Greater Than or Equal to: a >= b
- Less Than: a < b
- Less Than or Equal to: a <= b
- Equal to: a == b
- Not Equal to: a != b
♣ Example1: If in Pythonif condition code block is executed when the associated if the given condition is satisfied(true).
♣ Example2: ElIf in Pythonelif keyword is python's way of saying "if the previous conditions were not true, then try current given condition" and execute the respective code block.
♣ Example3: Else in Pythonelse condition block is executed when all prior conditions(if condition, elif condition(s)) are false.