The problem is here.
This means that name
is empty. You have to check whether the list is empty before you do anything.
In here.
1 Like
the problem is in this one
I don't really understand, can you suggest what should i change in detail?
Logically in real life, you cannot find the first item in an empty grocery list. So, you have to make sure the list is not empty before you do anything.
1 Like