Can someone help me with the function remove_stopwords? I have used str.replace method, I wanted to get some hints as to what to use instead. i am getting 15/20 grades for the function.
Please click my name and message the code for remove_stopwords
There is still a problem that there is no space at of end of sentence. So, you may not end up removing all stopwords. Please do the following:
- Use
split()
method to create a list of words from thesentence
. - Filter out stopwords from the list.
- Use string
join
method to join the non-stopwords and return the result.
Thank you, your suggestion helped