Symmetric Difference

Sort by

recency

|

1236 Discussions

|

  • + 0 comments

    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

  • + 0 comments
    _ = input()
    m = set(map(int, input().split()))
    _ = input()
    n = set(map(int, input().split()))
    
    for num in sorted(list(m.symmetric_difference(n))):
        print(num)
    
  • + 0 comments

    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)

  • + 0 comments

    Here is HackeRank Symmetric Difference in Python solution - https://programmingoneonone.com/hackerrank-symmetric-difference-solution-in-python.html

  • + 0 comments
    M,m=int(input()),set(list(map(int,input().split())))
    N,n=int(input()),set(list(map(int,input().split())))
    for i in sorted(((n.union(m)).difference(n.intersection(m)))):print(i)