ID EN
Random

randrange

Python 3.11

Return a randomly selected element from range(start, stop, step). This is equivalent to choice(range(start, stop, step)), but doesn’t actually build a range object.

Syntax

PYTHON
random.randrange(stop)

See Also

range() randrange() TypeError ValueError TypeError