We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
m = int(input())
m1 = set(map(int,input().split()))
n = int(input())
n1 = set(map(int,input().split()))
m1_n1 = sorted(m1.symmetric_difference(n1))
for i in m1_n1:
print(i)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Symmetric Difference
You are viewing a single comment's thread. Return to all comments →
m = int(input()) m1 = set(map(int,input().split())) n = int(input()) n1 = set(map(int,input().split())) m1_n1 = sorted(m1.symmetric_difference(n1)) for i in m1_n1: print(i)