79443922

Date: 2025-02-16 21:04:51
Score: 1.5
Natty:
Report link

If no seed is provided for pythons built-in random then it will use os.urandom() to set the seed. Crucially, if the operating system has a built in source of randomness it will default to using that instead of just using the system time.

While you could mess with the Linux configuration settings, it would be much easier just to initialize a random seed with random.seed(int(time.time())**20%100000)

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Christopher D'Arcy