I have a rather big program, where I use functions from the random module in different files. I would like to be able to set the random seed once, at one place, to make the program always return the same results. Can that even be achieved in python?
I have a rather big program, where I use functions from the random module
Share
The main python module that is run should
import randomand callrandom.seed(n)– this is shared between all other imports ofrandomas long as somewhere else doesn’t reset the seed.