Home >>Python Random Module >Python Random random() Method

Python Random random() Method

Python Random random() Method

Python Random random() Method in python is used to return a float random number between 0 and 1.

Syntax:
random.random()
Here is an example of Python Random random() Method:

import random
print(random.random())

Output:
0.16547441042173827

No Sidebar ads