Staging
v0.5.1
https://github.com/python/cpython
Revision b7677095d4ba143cc6d265cfde006bbcbccebcd7 authored by Guido van Rossum on 07 August 1995, 20:15:23 UTC, committed by Guido van Rossum on 07 August 1995, 20:15:23 UTC
1 parent 8755582
Raw File
Tip revision: b7677095d4ba143cc6d265cfde006bbcbccebcd7 authored by Guido van Rossum on 07 August 1995, 20:15:23 UTC
make sure os.environ exists (maybe empty)
Tip revision: b767709
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