sampleqa.in tutorials, python 3 tutorial,python tutorial

Python tutorial


Python range, xrange, random classes


Range

xrange

     Like range(), but doesn’t actually store the entire list all at once (rather, it generates one integer at a time). This is useful in for loops when there is a big range and little memory. It optimizes space, but generally has no speed benefit.

Random

ADS