News for hackers. Stuff that matters.
Re:Why I'm still using Python by xvedejas on Friday December 30, 2022 @04:48PM (#34190517)
Additionally I find that it's easier to add complexity to the loops; once you want to start doing nontrivial things in a list comprehension, you often need to rewrite it into a loop first anyway.
Re:Why I'm still using Python by Spivak on Friday December 30, 2022 @06:05PM (#34191178)
> It's easier to add complexity to the loops

This is basically selling point for comprehensions. You can't add complexity to them so any comprehension you see fits a few common loop patterns you can grok immediately.

If you see an actual for loop in python it means "pay attention something odd is probably going on."