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.
Set .symmetric_difference() Operation
Set .symmetric_difference() Operation
Sort by
recency
|
297 Discussions
|
Please Login in order to post a comment
n=int(input()) n_student=set(map(int, input().split())) b=int(input()) b_student=set(map(int, input().split()))
num = n_student ^ b_student print(len(num))
a=(input()) b_a=set(map(int,input().split())) c=(input()) d_c=set(map(int, input().split())) set_1=b_a.symmetric_difference(d_c) print(len(set_1))
e=int(input()) english=set(input().split())
f=int(input()) french=set(input().split())
inter=english.symmetric_difference(french)
print(len(inter))
Enter your code here. Read input from STDIN. Print output to STDOUT
if name == 'main': n = int(input()) n = set(list(map(int , input().split())))