python basis (conditional statement)

The if statement

if 条件 :
    print"ok"else:
    print("Eorro")

 

 

if a:
    b
elif c:
    d
else:
    e

supplement:

IF . 1. 1 == :
     Pass     # no action 
the else : 
    block

 

Guess you like

Origin www.cnblogs.com/chenjiayun/p/11129714.html