python 流程控制

# coding=utf-8 ''' if判斷: >任何非零數字或非空對象都爲真 >數字0,空對象以及特殊對象None都是False ''' result = 1 and 1>2 print result ''' 三中布爾表達式運算 and 與運算(&&) or 或運算(||) not 非運算(!) ''' cond1 = 1 cond2 = 1>2 if cond1 and cond2:
相關文章
相關標籤/搜索