Re: I have a question.
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: I have a question.

From: Jags <njagan@gmail.com>
Date: Thu Jun 30 2005 - 19:53:54 CEST

Hi,

  You can use the "Random" module. You need to first import it using
"from random import Random, random".

Try the following sequence of steps on the Python/IDLE command line to
get an idea:

>>> from random import Random, random
>>> myRandom = Random()
>>> myRandom.random()

  Hope this helps.

  Cheers!
  -- Jags.

Nathan Pinno wrote:
> Hi all,
>
> Does Python have a random function? If so, can you show me an example
> using it?
>
> Thanks,
> Nathan Pinno
> http://www.npinnowebsite.ca/
>
>
>
> --
>
>
> ----------------------------------------------------------------
> Posted via UsenetRevolution.com - Revolutionary Usenet
> ** HIGH RETENTION ** Specializing in Large Binaries Downloads **
> http://www.UsenetRevolution.com
Received on Thu Sep 29 16:40:22 2005