数字与逻辑运算符
**数字与逻辑运算符**
逻辑运算符:not,and和or
运算符的优先级:not>and>or
数字加逻辑运算符:
**注:数字中0为False,其余数字均为True。**
1.not
not x(表示任意数):x为0时(即not False),
输出True;x为其他数时(即not True ),输出False。
2.and
x and y(x,y均表示任意数):x为0时(即x为False),
...
原创
2021-03-16 18:52:09 ·
766 阅读 ·
0 评论