If .... else

The order of execution of the statements in a program is known as flow of control.  If .. else in python is a important tool to make decisions. suppose you want to check a condition in python for that if ... else is required. 

If will be execute only if condition is true. otherwise, else will execute.

if condition: 

statement(1) 

else :

statement(2)

a=10

if a==10:

print ("condition is true")

else:

print ("condition is false")

Output

condition is true


b=20

if b==10:

print ("condition is true")

else:

print ("condition is false")

Output

condition is false