(Sets)
Problem Statement:
Given 2 sets of integers M and N, print their symmetric difference in ascending order. The term symmetric difference indicates those values that exist in either but do not exist in both.
Solution:
# Enter your code here. Read input from STDIN. Print output to STDOUTM = int(input())li_M = list(map(int, input().split()))N = int(input())li_N = list(map(int, input().split()))sM = set(li_M)sN = set(li_N)sD = sM.symmetric_difference(sN)sorted_S = sorted(sD)for i in sorted_S: print(i)
Output:

Reference:
https://www.hackerrank.com/challenges/symmetric-difference/problem
