1.Introduction
Situations in python helps us in some ways as they’re the block of code during which we will specify some situation within the code to be carried out.
2.If
The if assertion exhibits a code for a call making assertion. ‘if’ is the key phrase and ended by ‘:’ on the finish.
syntax
The output for above instance is
3.Elif
The elif situation signifies that if the earlier situation shouldn’t be glad then elif assertion will probably be checked. The ‘elif’ is the key phrase and ended by colon.
syntax
The output for above instance is
4.Else
The else assertion signifies that if the ‘if’ or ‘elif’ assertion shouldn’t be true then this will probably be right.
The output for above instance is