Generators are special functions, different from the normal functions in their way of execution. A generator is able to pause and resume execution on per request basis, unlike the standard run-off-the-mill functions. Before we get into the syntax and usages of generators, here is an example showing the distinction between normal functions and generators.

– See more at: Classmite