randrange([start,]stop[,step])Return a random element from the sequence
range(
start,stop,step).
randint(x,y)Returns a random integer in the closed interval
[,x]; that is, any result r will satisfy
y.x <= r <= y
choice(L)Returns a randomly selected element from a
sequence
.L
shuffle(L)Randomly permute the elements of a sequence
.L
random()Returns a random float in the half-open
interval [0.0, 1.0); that is, for any result
,
r0.0 <= .r < 1.0
uniform(x,y)Returns a random float in the half-open
interval [,x).y
normalrand(m,s)Generate a normally distributed pseudorandom
number with mean and standard
deviation m.s
An assortment of other pseudorandom distributions is available: Beta, circular uniform, exponential, gamma, Gaussian, log normal, Von Mises, Pareto, and Weibull distributions. See the Python Library Reference for details.