The topic of generators has been covered numerous times before. However, it’s still a topic that a lot of new programmers have trouble with and I would hazard a guess that even experienced users don’t really use them either.

Python generators allow developers to lazily evaluate data. This is very helpful when you are dealing with so-called “big data”. Their main use is for generating values and for doing so in an efficient manner. In this article, we will go over how to use a generator and take a look at generator expressions. Hopefully by the end you will comfortable using generators in your own projects. (more…)