in a simple list following check is trivial:
x = [1, 2, 3]
2 in x -> True
but if it is a list of list, such as:
x = [[
The Óscar Lopez answer is so great! I recommend to use it.
However, you can use itertools to flatten the list and eval it, so:
import itertools
x = [[1, 2, 3], [2, 3, 4]]
2 in itertools.chain.from_iterable(x)
Output: True
Also, you can make it "manually" through comprehension:
x = [[1, 2, 3], [2, 3, 4]]
2 in [item for sub_list in x for item in sub_list]
Output: True
These're only other ways to make it, good luck.