For container types such as lists and tuples, x in container
checks if x
is an item in the container. Thus with ours in theirs
, Python checks if ours
is an item in theirs
and finds that it is False.
Remember that a list could contain a list. (e.g [['a','b','c'], ...]
)
>>> ours = ['a','b','c']
>>> theirs = [['a','b','c'], 1, 2]
>>> ours in theirs
True