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)
#1Program to find Larger number of three number.
#1Program to find Larger number of three number.
print("Enter the three number")
a=int(input())
b=int(input())
c=int(input())
if a<=b:
if b<=c:
print("This number is Big",c)
else:
print("This number is Big",b)
else:
if a<=c:
print("This number is Big",c)
else:
print("This number is Big",a)