Comprehensive Python documentation.
Compute items lazily using yield to optimize memory consumption.
yield
stream = (x * x for x in range(1000000))