So there are 2 for statements in my code, one inside the other. This was the way it was instructed to be done as well. I know the code isn’t supposed to be here, but help me
You should not post the code here. Please remove immediately.
Your answer is in this thread already. Read carefully, then, you can go ahead.
One hint is, even if ‘w’ is in sentence_words
, it does not mean it is in “word_to_index
”.
Before accessing it, you need to check it.
Thank you! Will try it out