You are viewing a single comment's thread. Return to all comments →
a = int(input()) A = set(map(int, input().split())) N = int(input()) operations = {'intersection_update': A.intersection_update, 'update': A.update, 'symmetric_difference_update': A.symmetric_difference_update, 'difference_update': A.difference_update} for _ in range(N): name, _ = input().split() B = list(map(int, input().split())) operations[name](B) print(sum(A))
Seems like cookies are disabled on this browser, please enable them to open this website
Set Mutations
You are viewing a single comment's thread. Return to all comments →