You are kidding.
The Map one exactly describe what it does. it 'maps' the data. Which means it describes it in the way function fn is telling it. Which is really easy to read if you understand english...
The Map one exactly describe what it does. it 'maps' the data. Which means it describes it in the way function fn is telling it. Which is really easy to read if you understand english...
Maybe I missed something, but how does this
> [fn(i) for i in data]
read easier if you know english? You need to know the syntax of "[...]" to know what it does.
The top/first example, however, actually reads like english.
If you knew Python you'd know exactly what that means. But zokier is right, a map is probably a better choice here.
Anyone with even a basic understanding of python (the language of the examples we've been discussing here) should know this syntax. If they didn't I'd be worried.