You can use sets

t1 = [ (1,2), (3,4), (5,6), (7,8), (9,10), (11,12) ]
t2 = [ (3,4), (11,12) ]
set(t2).issubset(t1)
# returns true

# or equivalent use '<=' so
set(t2) <= set(t1)
# returns true
Answer from Finn on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί python-check-if-the-list-contains-elements-of-another-list
Python Check if the List Contains Elements of another List - GeeksforGeeks
July 23, 2025 - Counter() class from the collections module creates a frequency dictionary that maps each element to its count in a list. This is particularly useful when it is important to verify the number of times each element appears in the list.
Discussions

how to check if an element of a nested list appears in another list?
You need to "flatten" list1 into another list that doesn't contain sublists. Search for "python flatten list" to find out how to do that. Then you can use your any() approach to check that flat list against list2. You could also write a recursive function that takes two lists. It would iterate over one list, checking if the element of the list was another list or not. If not, check if the element is in the other list. If it was a list then do a recursive call checking that sublist against the other list. In fact, do both as it's a good learning experience :) More on reddit.com
🌐 r/learnpython
6
2
October 4, 2020
python - Can I check if a list contains any item from another list? - Stack Overflow
using Python, I want to check if a list contains an item/value that is also present in another list. For example, here is what I am trying to do: list1 = ['item1','item2','item3'] list2 = ['item4',' More on stackoverflow.com
🌐 stackoverflow.com
How do I check if a list contains all the elements of another list in Python? It's not working - Stack Overflow
actually i'm an idiot sorry. i ... if an element is in a sequence or whatever, but what does item in list1 AND THEN for item in list2 mean? is this some type of weird list comprehenion? how can you write for item in list without a : and for loop body, i've never seen that type of for loop before. can you please explain the syntax 2021-04-23T02:44:46.017Z+00:00 ... You will have luck if you look for python iterators ... More on stackoverflow.com
🌐 stackoverflow.com
July 23, 2025
Find all items from one list that are not in another list
Also there is bult-in method for sets https://docs.python.org/3/library/stdtypes.html#frozenset.difference To use it you need to convert your lists into sets diff = set(List1). difference(set(List2)) More on reddit.com
🌐 r/learnpython
13
10
December 21, 2022
🌐
TechBeamers
techbeamers.com β€Ί program-python-list-contains-elements
Python Program: Check List Contains Another List Items - TechBeamers
November 30, 2025 - The list ['python', 'javascript', 'csharp', 'go', 'c', 'c++'] contains all elements of the list ['csharp', 'go', 'python'] ... Another method is any() which we can use to check if the list contains any elements of another one.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί python-check-if-a-list-is-contained-in-another-list
Check if a List is Contained in Another List - Python - GeeksforGeeks
July 1, 2025 - B[i:i+n] takes slices of list B of the same length as A. A == B[i:i+n] checks if any slice matches A exactly and in order. any() returns True if at least one match is found. Using two for loops, one to go through the larger list and another ...
🌐
LabEx
labex.io β€Ί tutorials β€Ί python-how-to-check-if-all-elements-of-a-list-are-contained-in-another-list-415148
How to check if all elements of a list are contained in another list | LabEx
Perform Set-like Operations: Combine list membership with other list operations to perform set-like operations, such as finding the intersection, union, or difference between two lists. In Python, the in operator is the primary way to check ...
🌐
Flexiple
flexiple.com β€Ί python β€Ί python-list-contains
Python list contains: How to check if an item exists in list? - Flexiple
Its simplicity and readability make it the go-to choice for quickly verifying the presence of an element without the need for loops or additional method calls. my_list = [1, 2, 3, 4, 5] exists = 3 in my_list print(exists) # Output: True Β· This code snippet efficiently determines the presence of 3 in the list, showcasing the in operator's capability to provide a clean and efficient solution for existence checking in Python lists. To check if the Python list contains an element using the in operator, you can quickly determine the element's presence with a concise expression.
Find elsewhere
🌐
TutorialsPoint
tutorialspoint.com β€Ί article β€Ί python-check-if-a-list-is-contained-in-another-list
Python - Check if a list is contained in another list
July 10, 2020 - listA = ['x', 'y', 't'] listB = ['t', 'z','a','x', 'y', 't'] print("Given listA elemnts: ") print(', '.join(map(str, listA))) print("Given listB elemnts:") print(', '.join(map(str, listB))) res = ', '.join(map(str, listA)) in ', '.join(map(str, listB)) if res: print("List A is part of list B") else: print("List A is not a part of list B") Running the above code gives us the following result βˆ’ Β· Given listA elemnts: x, y, t Given listB elemnts: t, z, a, x, y, t List A is part of list B Β· We can design a for loop to check the presence of elements form one list in another using the range function and the len function.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python-check-if-a-list-is-contained-in-another-list
Python | Check if a list is contained in another list - GeeksforGeeks
May 10, 2023 - The task of checking if a list contains elements of another list in Python involves verifying whether all elements from one list are present in another list. For example, checking if ["a", "b"] exists within ["a", "b", "c", "d"] would return ...
🌐
Quora
quora.com β€Ί How-do-I-efficiently-find-which-elements-of-a-list-are-in-another-list
How to efficiently find which elements of a list are in another list - Quora
Below are the common efficient patterns, with complexity and trade-offs. ... Convert the container list B to a set: S = set(B). Test elements of A: result = [x for x in A if x in S].
🌐
Codedamn
codedamn.com β€Ί news β€Ί python
Python List Contains: How to Check if an Item is in a List
June 30, 2023 - A: Yes, the 'in' operator works with other data structures in Python like tuples, dictionaries, and sets. Q: What's the time complexity of the 'in' operator? A: For lists, the 'in' operator has a time complexity of O(n), where n is the length ...
🌐
Python Forum
python-forum.io β€Ί thread-36106.html
How to check if a list is in another list
January 17, 2022 - Hi All, I have the below code: list_1 = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'] win_1 = ['1', '2', '3', '4'] if win_1 in list_1: print('yes')It doesn't print anything, how do I check if a list is in another list?
🌐
Python Examples
pythonexamples.org β€Ί python-check-if-list-contains-all-elements-of-another-list
Check if the List contains all elements from another List
Python - To check if a list contains all elements of other list, use all() function with iterable generated from the list comprehension where each elements represent a boolean value if the element in the other list is present in the source list. We can also use nested for loop for this check.
🌐
Codedamn
codedamn.com β€Ί news β€Ί python
Python List Contains: How to Check for Specific Elements
July 2, 2023 - The simplest way to check if a Python list contains an element is by using the 'in' keyword. This is a built-in Python operator that checks if a list (or any iterable) contains a specific element.
🌐
Reddit
reddit.com β€Ί r/learnpython β€Ί find all items from one list that are not in another list
r/learnpython on Reddit: Find all items from one list that are not in another list
December 21, 2022 -

Hello all,

I am trying to create a list (list3) of all items that are exist in one list (list1), but do not exist in another list (list2). Any help would be greatly appreciated!

I am using pandas / data frames to create two lists each made of the items in a column in different excel files and I want to identify the items in list1 that are not found in list2.

Basically I have:

Df1 = pd.read_excel(file1)

Df2 = pd.read_excel(file2)

List1 = df1['Column Name']

List2 = df2['Column Name']

List3 = [x for x in List1 if x not in List2]

This is basically just recreating List1 and not omitting the entries that exist in List2.

Thank you all in advance! Please let me know if you need more info

🌐
Moonbooks
en.moonbooks.org β€Ί Articles β€Ί How-to-check-if-any-word-from-one-list-is-present-in-an-element-of-another-list-in-Python-
How to check if words from one list is present in an element of another list in Python ?
If you want to check whether all words from one list are present in an element of another list, you can modify the code to use all() instead of any(). This will ensure that the element contains all words from the list.
🌐
Python.org
discuss.python.org β€Ί python help
Multiple element contain check for list, tuple - Python Help - Discussions on Python.org
July 18, 2022 - current scenario - 1) 1 in [1, 2, 3] # or, 1 in (1, 2, 3) β†’ True but, if one wants to check whether more than one element is in a list, then this technique does not work for a set, there is issubset method, that is, ({1, 2}).issubset({1, 2, 3}) β†’ True one way to get multiple element contain check is through all keyword, that is, all(i in [1, 2, 3] for i in [1, 2]) β†’ True expected scenario - there is a method for list, tuple, that works like, ([1, 2]).elements_in([1, 2, 3...