December 2011

archive

random integer with a range in python Dec
14
1
1

To create a random integer within a range you can use the following command:

import random

# random integer between 1 and 100
RANDOM_INTEGER = random.randint(1, 100)

comments