I was Googling what random.seed() does and found that the random module in Python in fact implements pseudo-random number generators.
We need to set a seed because the pseudo-random number generators work by performing some operation on a value. Different seed will generate different number sequences. In the example below, if we set the seed to be 123, we can find that the generated number sequences are same! That’s why we call it “pseudo-random”.
|
|
Reference:
https://stackoverflow.com/questions/22639587/random-seed-what-does-it-do