Set Mutations

  • + 0 comments

    set_1 = set(map(int,input().split())) b = int(input()) for i in range(b): cmd = list(input().split()) operation = cmd[0] set_2 = set(map(int, input().split())) getattr(set_1, operation)(set_2) print(sum(set_1))