A = [1,2,3,4,4]
B = [3,4,5] 

set1 = set(A)
set2 = set(B)

common_elements = set1.intersection(set2)

count = len(common_elements)

print(count)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: