diff --git a/Doc/library/random.rst b/Doc/library/random.rst index 35795cde95d56f..0704ff1d06ac37 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -300,6 +300,9 @@ be found in any statistics text. Return the next random floating-point number in the range ``0.0 <= X < 1.0`` + To generate :const:`True` with probability ``0.0 <= p <= 1.0``, + use ``random() < p``. + .. function:: uniform(a, b)