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
|
436 Discussions
|
Please Login in order to post a comment
Here's my code
english = int(input()) english_s = set(list(map(int, input().split()))) france = int(input()) france_s = set(list(map(int, input().split()))) print(len(english_s & france_s))
What is wrong with my code?
n = input() d,a,c,b= n.splitlines() a = set(a.split()) b = set(b.split())
x = a.intersection(b) l = len(x) print(l)