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 .intersection() Operation
Set .intersection() Operation
Sort by
recency
|
464 Discussions
|
Please Login in order to post a comment
N=int(input()) # english newspaper English=set(map(int,input().split()))
N1=int(input()) # french newspaper French=set(map(int,input().split()))
'''Common_subscription=English.intersection(French) print(len(Common_subscription))'''
YOU CAN ALSO USE THIS
METHOD
print(len(English.intersection(French)))
a,n,b,m=int(input()), set(input().split()), int(input()), set(input().split())
print(len(n.intersection(m)))