Generator is a simple way to create iterators, it is also called a function which return an object
A function that contains a yield statement is called generator function
for n in range(length):
for square in squares(5):
Python generator expression
A generator express return generator object.
cubes = (n*n*n for n in range(5))
for cube in cubes: