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.
- Prepare
- Python
- Sets
- Symmetric Difference
- Discussions
Symmetric Difference
Symmetric Difference
Sort by
recency
|
1206 Discussions
|
Please Login in order to post a comment
m = int(input())
a = set(map(int, input().split()[:m]))
n = int(input())
b = set(map(int, input().split()[:n]))
result = a ^ b
for item in sorted(result):
_, a, _, b = int(input()), set(map(int, input().split())), int(input()), set(map(int, input().split()))
print(*sorted(a.difference(b).union(b.difference(a))), sep='\n')