top | item 25230174

(no title)

vanni | 5 years ago

OK, mystery solved. In Python:

  1 in [1,2,3] is True
is evaluated as

  (1 in [1, 2, 3]) and ([1, 2, 3] is True)
similarly to

  1 < 2 < 3
:facepalm:

discuss

order

No comments yet.