Comments you can see

Write code · Basic · §4.1 Remembering what you have seen

comments holds the IDs of the people who wrote the comments on a post, in the order the comments were written: comments[i] is the ID of the person who wrote comment i. blocked holds the IDs of the people you have blocked, and the same ID may appear more than once in blocked.

You cannot see the comments written by people you have blocked. Complete the function solution, which returns the number of comments you can see.

Function

solution(comments, blocked)

Constraints

Examples

commentsblockedresult
['kim', 'lee', 'park', 'lee', 'choi']['lee']3
['sun', 'moon']['star']2

Starter code

def solution(comments, blocked):
    answer = 0
    return answer

Solve this problem in your browser

Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.