1

I have two sets in a list which is followed,

set_list= [{224, 3, 138, 17, 222, 223}, {226, 3, 46, 17, 222, 223}]

I want to apply intersection operation on this list and the output should be like this:

set_list= [3,17,222,223]
2
  • 1
    Use set.intersection(*set_list). FYI I had to google for "intersection of multiple sets in python" to find the duplicate.
    – vaultah
    Nov 3, 2016 at 15:24
  • Thank you so much it worked. :D
    – user5453416
    Nov 3, 2016 at 15:28

1 Answer 1

1
result  = set.intersection(*set_list)