I have tried this
new_list = []
for w in sentence.split():
if w not in stopwords:
new_list.append(w)
and this
sentence = [w for w in sentence if w not in stopwords]
yet, I dont understand why I’m still getting
remove_stopwords(“I am about to go to the store and get any snack”)
Output:
‘i am about to go to the store and get any snack’
what am I doing wrong with this function? thank you.