1 # encoding: utf-8 2 3 # None与0都为False 4 print(bool(None)) 5 print(bool(0)) 6 7 # 短路运算符规则 8 # 假与取左 9 print(0 and 90) 10 11 # 真或取左 12 print(90 or 43) 13 14 # 假或取右 15 print(0 or 78) 16 17 # 真与取右 18 print(78 and 89)
标签:encoding none color 逻辑运算 int pre gpo and col
1 # encoding: utf-8 2 3 # None与0都为False 4 print(bool(None)) 5 print(bool(0)) 6 7 # 短路运算符规则 8 # 假与取左 9 print(0 and 90) 10 11 # 真或取左 12 print(90 or 43) 13 14 # 假或取右 15 print(0 or 78) 16 17 # 真与取右 18 print(78 and 89)
标签:encoding none color 逻辑运算 int pre gpo and col
原文地址:https://www.cnblogs.com/yuzhen233/p/8280207.html