The documentation for the random
module has this to say:
Warning: The pseudo-random generators of this module should not be used for security purposes. Use
os.urandom()
orSystemRandom
if you require a cryptographically secure pseudo-random number generator.