Skip to content

Commit 3c3b0d3

Browse files
solves set intersection
1 parent a210671 commit 3c3b0d3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

sets/set-intersection.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# https://www.hackerrank.com/challenges/py-set-intersection-operation/problem
2+
3+
int(input())
4+
english_subscriptions = set(map(int, input().split()))
5+
6+
int(input())
7+
french_subscriptions = set(map(int, input().split()))
8+
9+
all_subscriptions = english_subscriptions.intersection(french_subscriptions)
10+
print(len(all_subscriptions))

0 commit comments

Comments
 (0)