Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: ba0b6aeda605bec73c90f93fc05dd1cbc4efa9d3 authored by cvs2svn on 12 January 1995, 12:42:09 UTC
This commit was manufactured by cvs2svn to create tag 'r12beta1'.
Tip revision: ba0b6ae
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