Back to Browse

Python Generators: What They Are And What They're Good For

55 views
Aug 25, 2020
5:00

A generator is a lazy iterator. You can loop over lazy iterators as you would a list. Also, generators do not store their contents in memory. Why use a generator? First and foremost, they're fun! But, beyond that, they use less memory and are faster -- sometimes orders of magnitude faster! Code on GitHub: https://github.com/poly451/Tutorials/tree/master/Generators Visit me on Twitter: https://twitter.com/Strange451

Download

0 formats

No download links available.

Python Generators: What They Are And What They're Good For | NatokHD