Symmetric Difference

  • [deleted]
    + 0 comments

    For Python3

    M = int(input())
    A = set(map(int, input().split()))
    N = int(input())
    B = set(map(int, input().split()))
    
    res = sorted(A.symmetric_difference(B))
    
    print(*res, sep="\n")