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 = [[
Try this, using the built-in any function. It's the most idiomatic solution, and it's also efficient, because any short-circuits and stops as soon as it finds the first match:
any
x = [[1, 2, 3], [2, 3, 4]] any(2 in sl for sl in x) => True