Skip to content

Commit 142da44

Browse files
Create Symmetric Difference.py
1 parent 125bf41 commit 142da44

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if __name__ == '__main__':
2+
M = int(input())
3+
Set_M = set(map(int, input().split()))
4+
N = int(input())
5+
Set_N = set(map(int, input().split()))
6+
MN = Set_M.difference(Set_N)
7+
NM = Set_N.difference(Set_M)
8+
UNI = MN.union(NM)
9+
for i in sorted(UNI):
10+
print(i)

0 commit comments

Comments
 (0)