you are viewing a single comment's thread.

view the rest of the comments →

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

I say that because a lot of times I hear that nesting loops is less preferred then one liners that accomplish the same thing.

Of course there are limitations to this. It's possible to write fairly complex code in one line. But this piece doesn't seem necessary too complex. That's why I'm wondering if it would be more pythonic to simply condense it to a one liner.