union of sets the union operation on two sets produces new set containing all the distinct elements from both the sets in the below examplethe element "wedis present in both the sets daysa set(["mon","tue","wed"]daysb set(["wed","thu","fri","sat","sun"]alldays daysa|daysb print(alldayswhen the above code is executedit produces the following result please note the result has only one "wedset(['wed''fri''tue''mon''thu''sat']intersection of sets the intersection operation on two sets produces new set containing only the common elements from both the sets in the below examplethe element "wedis present in both the sets daysa set(["mon","tue","wed"]daysb set(["wed","thu","fri","sat","sun"]alldays daysa daysb print(alldayswhen the above code is executedit produces the following result please note the result has only one "wedset(['wed']difference of sets the difference operation on two sets produces new set containing only the elements from the first set and none from the second set in the below examplethe element "wedis present in both the sets so it will not be found in the result set daysa set(["mon","tue","wed"]daysb set(["wed","thu","fri","sat","sun"]alldays daysa daysb print(alldayswhen the above code is executedit produces the following result please note the result has only one "wedset(['mon''tue']