2 ms·
I rarely use for loops in Python. Most of the time I use list comprehensions, which are much more terse and expressive than loops and, at least to me, are easie
by RyanMcGreal 16y ago
I rarely use for loops in Python. Most of the time I use list comprehensions, which are much more terse and expressive than loops and, at least to me, are easier to parse than map/filter/reduce functions.
- KirinDave 16y agoFunny, that. List comprehensions are actually sytactically and semantically more difficult than folds, modulo your logic. Honestly, I suspect the Haskell style and the curious Python cultural disdain for real lambadas have far more to do with your confort than any absolute metric of comprehension.
- skm 16y agoAnyone who has disdain for real lambadas just doesn't know what they're missing: http://www.youtube.com/watch?v=5AfTl5Vg73A http://www.youtube.com/watch?v=5AfTl5Vg73A