对于
连续的运算符
(例如a < x < b
)python
会展开成(a < x and x < b)
>>> 1 in (1, 2)
True
>>> 1 in (1, 2) in (1, 2, 3)
False
>>> 1 in (1, 2) in ((1, 2), 3)
True
>>> None is None in (True, False)
False
>>> None is False
False
>>> None is False in (True, False)
False
>>> 1 in (1, 2) == True
False