In python2.x and 3.x range, xrange difference

 

 py2  : 

          xrange, will not be created in memory, but at the time of the cycle, while circulating create

           range, will immediately ownership are created in memory

py3:

        range, will not immediately create in memory, childhood in the cycle, while circulating created.

 

Guess you like

Origin www.cnblogs.com/eddycomeon/p/11639626.html