I'm writing some functions that require division by a random float, and while it's highly improbable that it will throw a ZeroDivisionError, I can't sleep until I'm positive it won't. Is there a random.random() analog for Python that's 0 exclusive.
As the random.random
returns values [0.0, 1.0) as pointed out by Kevin Christopher Henry, it is easy to transfrom that into (0.0, 1.0] without any conditional code by:
1.0 - random.random()