In Python you can use a.intersection(b) to find the items common to both sets.
a.intersection(b)
Is there a way to do the disjoint opposite version of this? Ite
a={1,2,4,5,6} b={5,6,4,9} c=(a^b)&b print(c) # you got {9}