Python if-else nested Control Statement​

Python Nested if-else

  • if with in if-else called nested if-else control statements.
Syntax:
/* if-else (nested)syntax */
if (condition):
 if (condition):
  statements
 else:
  default statement
else:
 if (condition):
  statement
 else:
  default statements
Example of if-else (nested)
English Hindi