Symmetric Difference

  • + 0 comments
    m=int(input())
    a=list(map(int,input().split()))
    a=set(a)
    n=int(input())
    b=list(map(int,input().split()))
    b=set(b)
    c=a.intersection(b)
    d=a.union(b)
    e=d.difference(c)
    e=sorted(e)
    for i in range(len(e)):
        print(e[i],end='\n')