Stuck on project Thread shed - Python

I need help on step 18 it doesn’t seem to work I’m getting lists inside my list with more than one color in them
https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-python-strings/projects/thread-shed

Then perhaps you might want to iterate through each thing in your list and for each such value consider whether it needs to be broken apart, and to put all the results of that into a list.
Programming is about moving information around and reshaping it, isn’t? So a bit of that would solve this. Perhaps there wasn’t a direct instruction from codecademy on how to do it, but if you look at what you currently have and what you need to have then you can start figuring out what actions would bridge that difference.

you mean to iterate twice, once to get rid of the ‘&’ signs and add to a list and once to split it and make the new list?

If you get rid of & then wouldn’t you lose track of where to split?

Doesn’t really matter. Pick a strategy, ask yourself if you’re convinced it’ll get you closer to what you want, implement it, check the results, anything else to do? Do it/don’t. Next thing.

I’ll try that thanks!
:+1:

If they’re still strings then you may want to split them regardless of whether there’s an ampersand in them, that saves you from having two paths for two different cases, they’re really the same case and a single path will deal with both scenarios just fine.

can you please look at the program link above and see the problem cause I don’t seem to understand what you mean

What I’m saying is that

"a"
and
"a&b"

can both be split on &, even the one that doesn’t have & in it.

No I can’t look at any code, you haven’t provided any. But I probably don’t need to look at anything either, it’s more about adjusting what you have and you don’t need me for that.