Fork me on GitHub

Generators

Generators are a Python core language construct that allow a function's return value to to behave as an iterator. A generator can allow more efficient memory usage by allocating and allocating during the context of a large number of iterations. Generators are defined in PEP255 and included in the language as of Python 2.2 in 2001.

Python generator resources

What's next after learning about generators?

What other resources should I use to learn Python?

What editor should I use to program with Python?

Let me start over from the Full Stack Python introduction.

Sign up here to receive an email with major updates to this site and Python tutorials delivered to your inbox once a month.