3 ms·
I consider it an instance of https://en.wikipedia.org/wiki/Rule_of_least_power https://en.wikipedia.org/wiki/Rule_of_least_power List comprehensions are less e
by crdoconnor 9y ago
I consider it an instance of https://en.wikipedia.org/wiki/Rule_of_least_power https://en.wikipedia.org/wiki/Rule_of_least_power
List comprehensions are less expressive than for loops hence there is less to reason about.
Hence, if what you want is achievable with a list comprehension, its intent will naturally be clearer than the for loop equivalent.
...provided you don't make it intentionally obtuse like the OP did.