Skip to main content

Python If

if:It checks the if condition if condition is true then if statements are executed only one time. Otherwise terminating the if.

Syntax:

            if(condition):

                        #statements

Program:

a=10

if(a<15):

    print("a is less than 15")

Output:

a is less than 15

Comments