Given an explicit list that comprises of sets that contain elements in each of them, how can I check whether a specific element is in the list or not? It is supposed to be only one line of code.
For example: X is a list. It contains sets A, B and C. Assume set A contains {x, y, z}, B contains {l, m} and C contains {o, p}. If I were to check whether x is in the list, how must I do it?
any(x in set_ for set_ in X)?set