As the docs say:
For container types such as list, tuple, set, frozenset, dict, or collections.deque, the expression x in y is equivalent to any(x is e or x == e for e in y).
So, it's both.
1.4m articles
1.4m replys
5 comments
57.0k users