What is the syntax to see if an element is contained in list?

#following returns a boolean (true or false) value
<search value> in <list name>
#examples
>>> 'A' in ['A','B','C']
True

>>> nums = [1,2,3,4,5]
>>> 6 in nums
False

 

Advertisements