Random Generators
Generate pseudo-random numbers and choices.
Use the different methods of the built-in random
object for this.
Int()
Int()
random.int(min, max, count)
Parameters
An integer.
The start of the range.
Float()
Float()
random.float(min, max, count, decimals, unique)
Parameters
A float.
The start of the range.
Element()
Element()
random.element(iterable, count, weights, unique)
Parameters
The iterable to get random elements from.
E.g. a list.
Last updated