Im currently working on this code, that supposed to remove words that starts with 'no' this is what i have written so far.
text='none none is here but none is coming here again'
def count_words(text):
sent=text.split(" ")
for i in range(len(sent)):
if sent[i][0]=='n' and sent[i][1]=='o':
sent.remove(sent[i])
return sent
But when running i meet this error message: IndexError: list index out of range. Im not sure where im going out of range, anyone who can see that?