6 ms·
[4,8,12]?
by TheEzEzz 12y ago
[4,8,12]?
- ubernostrum 12y agoIf 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])
- frewsxcv 12y agoWith that logic, they should have expected [1,2,3] + [1,2,3] == [2,4,6]