x, y, z = 0, 1, 0if x == 1 or y == 1 or z == 1: print('passed')if 1 in (x, y, z): print('passed')# These only test for truthiness:if x or y or z: print('passed')if any((x, y, z)): print('passed')
本文共 207 字,大约阅读时间需要 1 分钟。
x, y, z = 0, 1, 0if x == 1 or y == 1 or z == 1: print('passed')if 1 in (x, y, z): print('passed')# These only test for truthiness:if x or y or z: print('passed')if any((x, y, z)): print('passed')
转载地址:http://akwfx.baihongyu.com/