|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
random number generator
how do I generate a random number in Python, can someon plz post an example? D:
|
|
#2
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > random number generator |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|