and 格式:操作数1 and 操作数2 如果操作数1的值为True(无论是什么类型 True、1、-1、’ '), 那么运算结果就等于操作数2。 In [8]: 3 and 2 Out[8]: 2 In [9]: 3 and 0 Out[9