Set Mutations

  • + 0 comments

    here you go

    len_A = map(int, input())
    A= set(map(int, input().split()))
    N = int(input())
    for i in range(0, N):
        command, length = input().split()
        Sec_set = set(map(int, input().split()))
        eval("A."+command+"(Sec_set)")
    print(sum(A))