Set .symmetric_difference() Operation

Sort by

recency

|

332 Discussions

|

  • + 0 comments

    Here is HackerRank Set .symmetric_difference() Operation in Python solution - https://programmingoneonone.com/hackerrank-set-symmetric_difference-operation-solution-in-python.html

  • + 0 comments

    n , m , o , p = int(input()), set(input().split()), int(input()), set(input().split())

    sd = m ^ p

    print(len(sd))

    hope find simple

  • + 0 comments
    n=input()
    e=set(input().split())
    b=input()
    f=set(input().split())
    print(len(e^f))
    
  • + 0 comments

    For Python3 Platform

    n = int(input())
    english = set(map(int, input().split()))
    b = int(input())
    french = map(int, input().split())
    
    print(len(english.symmetric_difference(french)))
    
  • + 0 comments

    n=int(input()) eng=set(map(int,input().split())) m=int(input()) french=set(map(int,input().split())) oeof=eng.symmetric_difference(french) not_common=list(oeof) print(len(not_common))