From the function signature we can know:
In [7]: Random.randrange? Signature:random.randrange (Start, Stop=none, step=1, _int=<type ' int ';, _maxwidth=9007199254740992l) docstring : Choose a random item from range (Start, stop[, step]). This fixes the problem with Randint () which includes theendpoint; In Python, this is usually don't what want. File: /usr/lib/python2.7/random.pytype: Instancemethodin [8]: Random.uniform? Signature:random.uniform (A, b) docstring:get a random number in the range [A, b] or [A, b] depending on rounding. File: /usr/lib/python2.7/random.pytype: instancemethod
Randrange is randomly selected from range (Start, stop[, Step), and the generated must be int;
Uniform is a random number generated from [A, b] or [A, b], and a float is generated;
These two usage scenarios are different.
"Recommended"
1. Special recommendation : "PHP Programmer Toolkit" V0.1 version download
2. Python Free video tutorial
3. python Foundation Uniform ()