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

 

posted @ 2020-03-24 10:23  太阳-向日葵  阅读(860)  评论(0编辑  收藏  举报