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
|
1235 Discussions
|
Please Login in order to post a comment
M, m = int(input()), set(list(map(int,input().split()))) N, n = int(input()), set(list(map(int,input().split())))
for i in sorted(m.symmetric_difference(n)): print(i)
Here is HackeRank Symmetric Difference in Python solution - https://programmingoneonone.com/hackerrank-symmetric-difference-solution-in-python.html