Generator

Generators are a special type of iterable in Python that allow lazy evaluation, meaning they yield items one at a time instead of storing everything in memory.

The yield keyword is used to create generators, making them memory efficient.

Useful when handling large datasets, infinite sequences, or streaming data.