Generator

Term side of the Card
Topic: Basics
Unit title: Generator
Categories: Concept
Explanation side of the Card

Explanation: The special type of function that can pause and resume its execution using the `yield` keyword. Generators return an `Iterator` object that produces a sequence of values over time. They save their state each time `yield` is used, allowing efficient iteration over large datasets with minimal memory use.

Edit on GitHubContributions in our content repository are 🤗 welcome from everyone.Link leads to the Contributions guidelines on GitHubLink leads to the content repository on GitHub