Web Analytics

Python random.randint() Method

Randomโ€ขInteger

The random.randint() method returns a random integer between two values (inclusive).

Syntax

random.randint(a, b)

Return Value

A random integer N such that a <= N <= b.

Example

Output
Click Run to execute your code