What are the membership operators?

  • in
  • not in
#examples
>>> numbers=[1,2,3,4,5]

>>> (1 in numbers)
True
>>> (6 in numbers)
False
Advertisements