python---逻辑运算(and、or、not)

and 运算

   1 and 2               结果:2

   0 and 1              结果:0

or 运算

   1 or 2                结果:1

   0 or 1                结果:1

   0 or 4                结果:4

not 运算

   

    not 0               结果:True

    not 1               结果:False

原文地址:https://www.cnblogs.com/taiyangfeng/p/12557293.html