You are viewing a single comment's thread. Return to all comments →
n= int(input()) list1 =input().split() b = int(input()) list2 = input().split() set1 =set(list1) set2 = set(list2) print(len(set1.intersection(set2)))
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()) list1 =input().split() b = int(input()) list2 = input().split() set1 =set(list1) set2 = set(list2) print(len(set1.intersection(set2)))