How to generate random numbers?ΒΆ

import random

print(random.randint(1, 6))    # integer
print(random.random())         # float
print(random.gauss(0.0, 1.0))  # standard normal dist

See also

The random module generates random numbers from common distributions. It does not require installation.

Documentation for the random module