Cheap VPS & Xen Server


Residential Proxy Network - Hourly & Monthly Packages

Python If Else


Syntax:

  1. if(condition):  False
  2.              statements
  3.     else:   True
  4.               statements

ifelse

Example-

  1. year=2000
  2. if year%4==0:
  3.     print  “Year is Leap”
  4. else:
  5.     print “Year is not Leap”

Output:

Year is Leap 

Comments

comments