Symmetric Difference

  • + 0 comments

    could have done it without the loop, but too many brackets don't look good

    M = input()
    M = set(map(int, input().split()))
    N = input()
    N = set(map(int, input().split()))
    S = sorted((M.difference(N)).union(N.difference(M)))
    for val in S:
        print(val)