Run
# Take two sets set_1 = {'a', 'b', 'c', 'd'} list_1 = ['a', 'o', 'm', 'c'] print(f"set_1 before update : {set_1}") # Intersection Update set_1 set_1.intersection_update(list_1) print(f"set_1 after update : {set_1}")
Output