Many common implementations of random number generators, are not truly random. Computers typically utilize Pseudorandom Number Generators, which means the computer uses a defined algorithm to generate a sequence of numbers that appear to be random.
In Python you can use the random
module to generate pseudorandom numbers. However, if you look at the docs, they include this note:
Warning The pseudo-random generators of this module should not be used for security purposes. Use os.urandom() or SystemRandom if you require a cryptographically secure pseudo-random number generator.