lib/random
— Generate pseudo-random numbers
import random
random.
randrange(stop) randrange(start, stop[, step]) |
[0, stop) integer equivalent to choice(range(start, stop, step)) but doesn’t actually build a range object. |
---|---|
random() | [0.0, 1.0) floating point |
uniform(a, b) | [a, b] |
altre distribuzioni |