You are viewing a single comment's thread. Return to all comments →
x = int(input())
li = input().split()
li = set([eval(i) for i in li])
n = int(input())
for line in range(int(n)):
operation = input().split() operation = operation[0] operationSet = input().split() operationSet = set([eval(i) for i in operationSet]) li.__getattribute__(operation)(operationSet)
Sum = sum(li) print(Sum)
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 →
x = int(input())
li = input().split()
li = set([eval(i) for i in li])
n = int(input())
for line in range(int(n)):
Sum = sum(li)
print(Sum)