Symmetric Difference

  • + 0 comments

    M = input() a = input() N = input() b = input()

    Mlis = set(map(int, a.split())) Nlis = set(map(int, b.split()))

    a1 = Mlis.difference(Nlis) b1 = Nlis.difference(Mlis)

    res = sorted((a1.union(b1)))

    res = sorted(Nlis.symmetric_difference(Mlis))

    for i in res: print(i)