Full name
random.random
Library
random
Syntax
random.random()
Description
The random.random function returns a random number in the range [0.0, 1.0) drawn from a uniform distribution.
Parameters
The random.random function takes no arguments.
Result
The random.random function returns a real number.
Examples
We can generate a random number in the range [0.0, 1.0) extracted from a uniform distribution with the following code:
random.random()
0.46216883512905227