I\'m doing some set operations in Python, and I noticed something odd..
>> set([1,2,3]) | set([2,3,4]) set([1, 2, 3, 4]) >> set().union(*[[1,2,3], [2
[removed incorrect answer]
As @Anto Vinish suggested you should first convert the lists to sets and then use set.intersection
For example:
>>> sets = [set([1, 2, 3]), set([2, 3, 4]), set([3, 4, 5])] >>> set.intersection(*sets) set([3])