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
|
1240 Discussions
|
Please Login in order to post a comment
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)
print(*(lambda m, set_m, n, set_n : sorted(set_m.symmetric_difference(set_n)))(input(), set(map(int, input().split())), input(), set(map(int, input().split()))), sep="\n")
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