I am trying to understand why my intersection does not return an empty list when I run this code.
n = ([1,2,3,4,5],[3,4,5,6],[5,6,7],[7,8,9,10,11,12],[10,22,33,44,45])
w = set(n[0]).intersection(*n[:1])
print(w)
#Returns (1,2,3,4,5)
However this returns the correct set
n = ([1,2,3,4,5],[3,4,5,6],[5,6,7],[7,8,9,10,11,12],[10,22,33,44,45])
w = set(n[0]).intersection(*n)
print(w)
#Returns empty set.
This question gave the correct results for both:
Python -Intersection of multiple lists?
Why do I not get the correct result when I compare the first set to the remaining lists?