Generating a random number
Dale Strickland-Clark
dale at riverhall.NOSPAMco.uk
Fri Oct 5 21:27:45 EDT 2001
"Ron White" <rwhite at netins.net> wrote:
>Will someone please tell me exactly how to generate a random number from 1
>to 10 in Python 2.1.1 running under windows me? I'm beginning to think
>there is something wrong with my installation or I'm just not smart enough
>to understand what I read.
>
>Thank you for any help.
>Ron
from whrandom import randint
print randint(1, 10)
--
Dale Strickland-Clark
Riverhall Systems Ltd
More information about the Python-list
mailing list