Symmetric Difference

  • + 0 comments
    M = int(input())
    M_values = set(map(int, input().split()))
    
    N = int(input())
    N_values = set(map(int, input().split()))
    
    combined_diff = sorted(M_values.difference(N_values).union(N_values.difference(M_values)))
    
    for v in combined_diff:
        print(v)