The random namespace provides random-number-related functions.
random
randfloat(low=0.0, high=1.0)
Returns a random float between low and high, inclusive.
low
high
randint(low=0, high)
Returns a random integer between low and high, inclusive.
choose(items)
Returns a random item from items.
items
sample(items, sample_size)
Returns up to sample_size items from items.
sample_size
Selection order is preserved.
There was an error while loading. Please reload this page.