5、and 和 orand返回第一个假值,如果都为真,返回最后一个真值。or返回第一个真值,如果都为假,返回最后一个假值。复制代码>>> a = "first">>> b = "second">>> 1 and a or b 1'first'>>> 0 and a or b 2'second'复制代码类似于: bool ? a : b安全使用:>>> a = "">>> b = "second">>> (1 and [a] or [b])[0] 1

python http服务器 :
https://blog.csdn.net/mrbcy/article/details/72630201