
Python - A Look into Generators
Introduction
In this short article we will look into Python generators.
A generator is,
a function that returns an object (iterator) which we can iterate over (one value at a time).[1]
Therefore, unlike lists, they are considered lazy. The key benefit to generators is that as they only produce