How do I create a random number integer from min to max in python?
ExampleCopy code to clipboard
min = 0 max = 9 for x in range(100): print(random.randint(min, max))
1 7 0 . . 9 6 1
Both min and max are included in the generated integers.
Link to documentation or other source
12 Oct 2019
Author: Loek van den Ouweland
Would you recommend this example to your colleagues?