Generators in Python Academy
Python Generator To List. Sqr = (i**2 for i in xrange (10)) #. However, if all you want is to iterate through the object, you do not need a list:
Sqr = (i**2 for i in xrange (10)) #. However, if all you want is to iterate through the object, you do not need a list:
However, if all you want is to iterate through the object, you do not need a list: However, if all you want is to iterate through the object, you do not need a list: Sqr = (i**2 for i in xrange (10)) #.