
March 7th, 2002, 02:27 AM
|
|
Python Prophet
|
|
Join Date: Jun 2001
Location: Amersfoort, The Netherlands
Posts: 45
Time spent in forums: < 1 sec
Reputation Power: 12
|
|
It's quite simple:
Code:
import random
# Fill in start, stop and step yourself.
number = random.randrange(start, stop, step)
Also take a look at the docs for the random module.
__________________
Some people, when confronted with a problem, think “I know, I'll use regular expressions.” Now they have two problems. - Jamie Zawinski, in comp.lang.emacs
|