Python · Level 2 of 5
Generator
An iterator that produces values lazily as execution advances.
It can process a stream without storing every output at once.
Example
A file reader yields one parsed record at a time.
Listen to the definition and example
Audio transcript
Generator. An iterator that produces values lazily as execution advances. It can process a stream without storing every output at once. For example: A file reader yields one parsed record at a time.
Explore this concept
Why it matters
This helps you follow Python-based experiments and understand their data structures and tools.
Related concepts
Quick recall question
Try answering before looking back at the definition.