You are viewing a single comment's thread. Return to all comments →
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))'''
METHOD
print(len(English.intersection(French)))
Seems like cookies are disabled on this browser, please enable them to open this website
Set .intersection() Operation
You are viewing a single comment's thread. Return to all comments →
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)))