Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 exam•Written by the Fiveable Content Team • Last updated August 2025
Definition
random.randint is a function in Python that generates random integers within a specified range. It takes two arguments - the lowest possible value and the highest possible value - and returns a randomly chosen integer between them.