# The difference_update() function can be used to update a set by removing values # that are shared with another given set mySet = {1, 2, 3, 4} mySet2 = {3, 4, 5, 6} mySet.difference_update(mySet2) print(mySet) # Output: # {1, 2}