Alex Rivera | Logout

Range of python's random.random() from the standard library

Asked 2010-02-01T21:45:26.543
20

Does python's random.random() ever return 1.0 or does it only return up until 0.9999..?

Edit
Report

1 Answer

10

Python's random.random function returns numbers that are less than, but not equal to, 1.

However, it can return 0.

answered 2010-02-01T21:48:09.857

Your Answer