Which explains why:
>>> False == False in [False] True
This odd looking expression is equivalent to
(False == False) and (False in [False]), hence why it evaluates to
And since there’s no limit to how many comparisons can be chained together, this kind of thing is legal syntax:
>>> False is False == False in [False] in [[False]] not in [False] True
See the Python docs on comparisons for more details.