Helpful Information
 
 
Category: Python Programming
random number generator

how do I generate a random number in Python, can someon plz post an example? D:

It's quite simple:


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 (http://python.org/doc/current/lib/module-random.html) module.










privacy (GDPR)