[Contents](../Contents.md) \| [Prev (5 Inner Workings of Python Objects)](../05_Object_model/00_Overview.md) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview.md)

# 6. Generators

Iteration (the `for`-loop) is one of the most common programming
patterns in Python.  Programs do a lot of iteration to process lists,
read files, query databases, and more.  One of the most powerful
features of Python is the ability to customize and redefine iteration
in the form of a so-called "generator function."  This section
introduces this topic.  By the end, you'll write some programs that
process some real-time streaming data in an interesting way.

* [6.1 Iteration Protocol](01_Iteration_protocol.md)
* [6.2 Customizing Iteration with Generators](02_Customizing_iteration.md)
* [6.3 Producer/Consumer Problems and Workflows](03_Producers_consumers.md)
* [6.4 Generator Expressions](04_More_generators.md)

[Contents](../Contents.md) \| [Prev (5 Inner Workings of Python Objects)](../05_Object_model/00_Overview.md) \| [Next (7 Advanced Topics)](../07_Advanced_Topics/00_Overview.md)
