I am having to make a simple chatbot for my Uni module using python.
Now I have a list of “stop-words” (about 50 of them) that through a “for loop” each word has to be inputted and replaced with an empty string object " ",
So for example
stop_words = [ “a”, “and”, “the”] etc there are approximately 50 words
for word in stop_words:
stop_word.replace(“a”, " ", 1)
I don’t know how to make the for loop run through the list and replace each of the 50+ words with " " empty text and how to check that it has worked.
Could anyone please help me here