# Guided Mission help: Jeopardy - Remove 'the' only first occurrence?

Hi all, I’m doing the Guided Mission for Jeopardy. The following code is given in the solution:

``````def count_matches(row):
split_question = row["clean_question"].split(" ")
return 0
match_count = 0
if item in split_question:
match_count += 1

``````

As far as I know, ‘remove’ only removes the first occurrence in the list. If the answer contains multiple times the word ‘the’, then only the first ‘the’ right? Shouldn’t we want to remove all ‘the’s’ in the answer?

You are correct. `.remove` only removes first entry found. And also pay attention, it’s case sensitive.
Official docs is here: https://docs.python.org/3/tutorial/datastructures.html

``````>>> s = 'The test is the best'
>>> a = s.split()
>>> a
['The', 'test', 'is', 'the', 'best']
>>> a.remove('the')
>>> a
['The', 'test', 'is', 'best']
``````

If you want to replace all entries, like The and the, then you can use something like this:

``````>>> s = 'The test is the best'
>>> a = s.split()
>>> a
['The', 'test', 'is', 'the', 'best']
>>> t = [x for x in a if x.lower() != 'the']
>>> t
['test', 'is', 'best']
``````