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
|
1236 Discussions
|
Please Login in order to post a comment
Great way to get hands-on practice with Python sets and understand their practical use. Looking forward to more challenges like this! Cricbet99 login id and password
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