1 >>> 2 or 3,3 or 2 2 (2, 3) 3 >>> 0 or 3 4 3 5 >>> [] or 3 6 3 7 >>> 0 or [] 8 [] 9 10 # or 从左往右 如果左边操作数是真值则输出左边操作数,否则输出右边 11 12 >>> 2 and 3, 3 and 2 13 (3, 2) 14 >>> 0 and 3 15 0 16 >>> [] and 0 17 [] 18 19 # and 跟 or 正好相反
时间: 2024-11-10 14:39:12
1 >>> 2 or 3,3 or 2 2 (2, 3) 3 >>> 0 or 3 4 3 5 >>> [] or 3 6 3 7 >>> 0 or [] 8 [] 9 10 # or 从左往右 如果左边操作数是真值则输出左边操作数,否则输出右边 11 12 >>> 2 and 3, 3 and 2 13 (3, 2) 14 >>> 0 and 3 15 0 16 >>> [] and 0 17 [] 18 19 # and 跟 or 正好相反