SyntaxFix
Write A Post
Hire A Developer
Questions
The difference is in the arguments. It's very common to generate a random number from a uniform distribution in the range [0.0, 1.0), so random.random() just does this. Use random.uniform(a, b) to specify a different range.
random.random()
random.uniform(a, b)