Use if statement to compare string : If : Statement PYTHON TUTORIALS


PYTHON TUTORIALS » Statement » If »

 

Use if statement to compare string


x = 'A'
if x == 'c':
    print "c"
elif x == 'b':
    print "b"
else:
    print 'A!'



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Statement
» If