2 ms·
If you want to perform an operation on each item of an iterable, do that :) [n * 4 for n in [1, 2 3]] or map(lambda n: n * 4, [1, 2, 3])
by ubernostrum 12y ago
If you want to perform an operation on each item of an iterable, do that :)
[n * 4 for n in [1, 2 3]]
or
map(lambda n: n * 4, [1, 2, 3])