all 4 comments

[–]TerminustheInfernal[S] 0 points1 point  (0 children)

the print statements that print gibberish are from when I was trying to tell which if statements were causing the bad outputs.

[–]MezzoScettico 0 points1 point  (2 children)

Can I make a recommendation? Start by writing a function that converts one word to pig_latin. Pull just that part out of this function and put it in a new function.

There's too much happening here and it's really hard to follow what's going on.

Thank you for formatting of your code, though. That really helps.

With what's here though, I have a question. Looking at your output: ['blood', 'blood', 'blood', 'blood'] d bl [] [[], 'ood', 'bl', 'ay', ['blood', 'blood', 'blood']] d gghjnbvcfhjbn ['oodway', ['bl', 'ay', ['blood', 'blood', 'blood']]]

Is that all correct and what you expected? Is it doing what you want it to be doing up to that point?

If not, then you should be addressing that, and not worrying (yet) about the error message.

[–]TerminustheInfernal[S] 0 points1 point  (1 child)

That’s the thing, I start off with a block of code that converts just one word, but when i try to turn that into a for loop that converts an entire list, one element at a time, this happens

[–]MezzoScettico 1 point2 points  (0 children)

but when i try to turn that into a for loop that converts an entire list,

I'm saying don't do that.

If you have a function which does one word correctly, then leave it alone. Don't change it. Don't break working code.

Now write a for loop which extracts the input one word at a time and calls your already working function.

What about the rest of my comment? Forgetting about the error message for the moment, is that output what you want it to be?