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
|
339 Discussions
|
Please Login in order to post a comment
num_english = int(input()) english_subs = set(map(int, input().split())) num_french = int(input()) french_subs = set(map(int, input().split())) exclusive_subs = english_subs.symmetric_difference(french_subs) print(len(exclusive_subs))
p = int(input()) y = set(map(int, input().split())) t = int(input()) d = set(map(int, input().split())) print(len(y ^ d))
For Python3 Platform