Staging
v0.5.1
https://github.com/python/cpython
Revision 06cf5d0d4c30a98226da3fd18c9227c5e7d09fd7 authored by Jack Jansen on 10 October 1995, 14:41:03 UTC, committed by Jack Jansen on 10 October 1995, 14:41:03 UTC
1 parent ab71c3f
Raw File
Tip revision: 06cf5d0d4c30a98226da3fd18c9227c5e7d09fd7 authored by Jack Jansen on 10 October 1995, 14:41:03 UTC
Added base64 codec docs
Tip revision: 06cf5d0
librand.tex
\section{Standard Module \sectcode{rand}}

\stmodindex{rand} This module implements a pseudo-random number
generator with an interface similar to \code{rand()} in C\@.  It defines
the following functions:

\renewcommand{\indexsubitem}{(in module rand)}
\begin{funcdesc}{rand}{}
Returns an integer random number in the range [0 ... 32768).
\end{funcdesc}

\begin{funcdesc}{choice}{s}
Returns a random element from the sequence (string, tuple or list)
\var{s}.
\end{funcdesc}

\begin{funcdesc}{srand}{seed}
Initializes the random number generator with the given integral seed.
When the module is first imported, the random number is initialized with
the current time.
\end{funcdesc}
back to top