Python Random random() Method
Example
Return random number between 0.0 and 1.0:
import random
print(random.random())
Run example »
Definition and Usage
The random()
method returns a random
floating number between 0 and 1.
Syntax
random.random()
Parameter Values
No parameters