https://github.com/python/cpython
Revision b6b43e00f8ba7ffd142795d2ed2e340e4a897a95 authored by cvs2svn on 08 August 1996, 19:05:09 UTC, committed by cvs2svn on 08 August 1996, 19:05:09 UTC
1 parent b4ae6a3
Raw File
Tip revision: b6b43e00f8ba7ffd142795d2ed2e340e4a897a95 authored by cvs2svn on 08 August 1996, 19:05:09 UTC
This commit was manufactured by cvs2svn to create tag 'r14beta2'.
Tip revision: b6b43e0
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