Hi,
I’ve got stuck in the training model of this assignment, everything seems correct in my codes but there is an AssertionError with a “wrong expected output” message. Help, please.
Thank you.
Hi @navid ,
The query for this error has been posted on the forums for a number of times. Here is a thread you may find helpful.
yes, I checked them, but none of them isn’t my problem. Could you check my code, if I send it to you in DM?!
Sure. I have a look for you.
Hi @navid ,
The problem is in this line of code:
single_example_ix = [char_to_ix[key] for key in char_to_ix.keys() for char in single_example_chars if key==char]
What you need is to get the index if the char is in single_example_chars:
single_example_ix = [char_to_ix[c] for c in single_example_chars]
4 Likes
Problem solved Thank you so much for your help.