DEV Community

Discussion on: Reducing Memory Consumption in Python using Generators

Collapse
lachlaneagling profile image
Lachlan Eagling Author

Thanks for the feedback. I am aware of these more concise ways of achieving the same result. I chose to write the code examples this way so it is very clear that generator expressions are being used, and not to obscure this behind language shortcuts such as sum(i for i in range(n)).

Collapse
hanpari profile image
Pavel Morava

I understand but I thought it was good to mention them