same number on a list python code example
Example 1: python same values in two lists
a = {1, 2, 3, 4}
b = {3, 4, 5, 6}
a.intersection(b)
Example 2: how to check if the to list are the same in python
>>> [0,1,2] == [0,1,2]
True
>>> [0,1,2] == [0,2,1]
False
>>> [0,1] == [0,1,2]
False