Improve readability of random module examples (GH-11884) (GH-11885)

Based on reviewer feedback from Allen Downey, convert ``lambda`` to ``def``.
(cherry picked from commit 9abb725cea7a1687b4d85ab9766ae6256a76a1ef)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
1 file changed