The Role of Generators
The support for generators exists in many programming languages. In most programming languages, we create a generator using the keyword yield. The role of the generator is to provide values (when we use it). These can be values that come from another source (such as another generator or a file), and these can also be new values that the generator creates. The possibility of working with a generator that provides values without keeping them in memory can help us when working with big data.
Generators in Python
Taking the Generators in Python course we developed you will gain a precious in-depth understanding of this topic.