Python中and和or的特殊用法

参考链接: 布尔表运算
Python中and和or的特殊用法

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> True and 35
35
>>> False and 56
False
>>> 35 and True
True
>>> 0 and True
0
>>> 56 and False
False
>>> 2 and 4
4
>>> 4 and 2
2
>>> type("")
<class 'str'>
>>> 
>>> 4 or 2
4
>>> 2 or 4
2
>>> 
上一篇:centos7.2 安装jenkins2.274


下一篇:网卡驱动问题修复:windows仍在设置此设备的类配置(代码:56)