Skip to content

Commit 0e671f2

Browse files
authored
gh-162817: Add randbool recipe to random documentation (#162836)
1 parent d9d8cb4 commit 0e671f2

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Doc/library/random.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ be found in any statistics text.
300300

301301
Return the next random floating-point number in the range ``0.0 <= X < 1.0``
302302

303+
The boolean expression ``random() < p`` is :const:`True` with probability
304+
``p``.
305+
303306

304307
.. function:: uniform(a, b)
305308

0 commit comments

Comments
 (0)