3 ms·
Believe it or not, it's the first time I've used a list comprehension for execution like that (other than when working interactively in ipython)! Originally I h
by aidos 11y ago
Believe it or not, it's the first time I've used a list comprehension for execution like that (other than when working interactively in ipython)! Originally I had a comment about how it was a non-idiomatic thing to do, but I deleted it.
What's strange is that I didn't even consider writing the for loop on a single line. I just never do that. It's clearly better in this case (than a list comprehension). In real code I'd just do it on 2 lines.