Comment
Comment by Izkata
An alternative for python is to flip what you're iterating over at the outermost level. It's certainly not as clean as F# but neither is it as bad as the original example if there's a lot of functions:
Then the list comprehension can be moved up to mimic more closely what you're doing with F#, allowing for operations other than "map":
And a step further if you don't like the "result" reassignment: