3 ms·
The map() function is already lazy (in python 3 it returns a generator, and not a materialized list). You can also have a look at "generator expressions", whic
by muxator 5y ago
The map() function is already lazy (in python 3 it returns a generator, and not a materialized list).
You can also have a look at "generator expressions", which are the lazy counterpart to a list comprehension (hint: use " ()" instead of "[]").