Hacker News new | past | comments | ask | show | jobs | submit login

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:



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: