Skip to main content

Python Nested If

 Nested if: If if contains another if and so on is called nested if.

Program:

a=10

if(a<15):

    if(a>9):

        print("Hello")

    print("Welcome")

Output:

Hello

Welcome

Comments