April 2017
Beginner to intermediate
312 pages
7h 23m
English
It is possible to check if a value is a member of a list using the in keyword. For example:
>>> random_list = [2, 1, 0, 8, 3, 1, 10, 9, 5, 4]
In this list, we could check if the number 6 is a member:
>>> 6 in random_list False >>> 4 in random_list True
Read now
Unlock full access