Welcome to the Treehouse Community
Looking to learn something new?
alex nonyaCourses Plus Student 9,265 Points
Random integer Module? Is there a module to import to simply ask for a random int between a start and stopping number?
This is such an inefficient way of generating random numbers, are there any modules that have created better methods?
I recently used Python3 to simply state randint(1, 10), which would give you a random integer between 1 and 10.
Steven Parker221,328 Points
The random function for picking integers in range is a well-known (and well-documented) formula that is easily implemented. The course shows how to do it in a single line.
As Piotr suggested, if you think you might use it frequently, you can always create your own library of functions and include it.