Python, Data Science, Data Engineering, Programming, Coding.
between two sets set3 = set1.symmetric_difference(set2) # We can use operators to perform the same operations set3 = set1 | set2 # union set3 = set1 & set2 # intersection set3 = set1 - set2 # difference set3 = set1 ^ set2 # symmetric difference # Note, using operators is more efficient than using