A typical if statement with all three kinds of clauses : If : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » If »

 

A typical if statement with all three kinds of clauses


x = 2

if x < 0:
    print "x is negative"
elif x % 2:
    print "x is positive and odd"
else:
    print "x is even and non-negative"



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Statement
» If