Home >>Python Random Module >Python Random randint() Method
Python Random randint() Method in python is used to generate random number and returns an integer number from the specified range.
Syntax:random.randint(start, stop)
Parameter | Description |
---|---|
start | It is Required to specifying an integer at which position to start. |
stop | It is Required to specifying an integer at which position to end. |
import random
print(random.randint(5, 8))
import random
print(random.randint(8, 17))