Javatpoint Logo

91-9990449935

 0120-4256464

Python If Else Statements

Syntax:

if(condition):	False
	         statements
	else:	True
	          statements

python If Else

Example-

year=2000
if year%4==0:
	print  "Year is Leap"
else:
	print "Year is not Leap"

Output:

Year is Leap
Next TopicPython History