Definition and Usage The randint() method returns an integer number selected element from the specified range. Note: This method is an alias for randrange(start, stop+1).
The random module gives access to various useful functions one of them being able to generate random numbers, which is randint (). In this article, we will learn about randint in Python.