num = [4, 1, 5, 2, 3]
find = [1, 3, 7]
answer = [0 for _ in range(len(find))]

for j in range(len(answer)):
    for i in range(len(num)):
        if num[i] == find[j]:
            answer[j] += 1

print(answer)

Embed on website

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