if 1==1: print('a') #一定要有缩进,否则会出现错误 print('b') print('c') #a #b #c print('##################################') if 1!=1: print('a') print('b') print('c') #c print('##################################') #和php、c一样,0表示false,1,2,3...都是真 if 1: print('1 is true') else: print('1 is false') #1 is true print('##################################') num = 70 if num<10: print('a') elif num<80: print('b') else: print('c') #b