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.
n = int(input())
count = 0
english_newspaper = set(map(int,input().split()))
m = int(input())
french_newspaper = set(map(int,input().split()))
x = english_newspaper.difference(french_newspaper)
for i in x:
count += 1
print(count)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Set .difference() Operation
You are viewing a single comment's thread. Return to all comments →
n = int(input()) count = 0 english_newspaper = set(map(int,input().split())) m = int(input()) french_newspaper = set(map(int,input().split())) x = english_newspaper.difference(french_newspaper) for i in x: count += 1 print(count)