Python Generator

Python generators are a way to create iterators using a function and the yield keyword, producing values one at a time instead of all at once. They are memory-efficient and useful for working with large or infinite sequences because values are generated only when needed.