Write a Python program that Given two Python sets, update first set with items that exist only in the first set and not in the second set


Topic: Write a Python program that Given two Python sets, update first set with items that exist only in the first set and not in the second set

Solution

set1 = {10, 20, 30}
set2 = {20, 40, 50}
print(set1.difference_update(set2))



List all Python Programs