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.
# Read inputn=int(raw_input())english=set(map(int,raw_input().split()))m=int(raw_input())french=set(map(int,raw_input().split()))# Students subscribed to only Englishonly_english=english.difference(french)# Output the countprint(len(only_english))
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 →