How do you remove an item inside a list, that's inside a list?

I'm trying to make a list of food names, and when different questions are answered it removes a certain item from the list. However, I can't figure out how to remove an item, that's inside a list, that's inside a list.

The list isn't fully complete, but I ran into this issue very early on.


I've tried that, but I can't seem to get it to work.

If I want to remove that, how do I get through all of those lists just to remove it.

You will need an additional variable to point to list items, one at a time, to climb through the maze to reach the final list that contains the item you want to remove.

This the path to your final list:
remove item 2.

For a parts explosion like this, consider an alternative organization, like in

There are two things I would - firstly, do not use lists inside of lists, and secondly at runtime make a list of "removed items" which can be checked (in milliseconds) to ensure the same question isn't asked twice.

1 Like