Quickly generate random numbers in Python 3

A quick guide on how to generate random numbers using various methods included in the random module.

The quick example below will generate a number between 0.0 and 1:

import random

r1 = random.random()

We can specify other criteria for generating the number:

# Generate a number between 0 and 1

# Select a random choice from a list

# Select a random number from within a range of numbers
random.randint(1, 1000)

There are many more additional features of the random module, see here for more information.