有没有办法简化:
if x == 1 and y == 2 and z == 3:
if x == 1 and y == 1 and z == 1:
if x == 1 or y == 2 or z == 3:
if x == 1 or x == 2
被简化为if x in [1, 2]:
有没有办法简化:
if x == 1 and y == 2 and z == 3:
if x == 1 and y == 1 and z == 1:
if x == 1 or y == 2 or z == 3:
if x == 1 or x == 2
被简化为if x in [1, 2]: