Python If Condition Program


  • If statement

It executes if block only when if condition is true

Program
a = 2 b = 7 if a > b: print("a is greater than b") if b > a: print("b is greater than a")
Input
Output