4 ms·
Then use a generator expression: `(2 * x for x in [1, 2, 3])` This is functionally (pun intended) equivalent to `map(lambda x: 2 * x, [1, 2, 3])`
by netheril96 11y ago
Then use a generator expression:
`(2 * x for x in [1, 2, 3])`
This is functionally (pun intended) equivalent to `map(lambda x: 2 * x, [1, 2, 3])`