The seed() is one of the methods in Python's random module. It initializes the pseudorandom number generator. You should call it before generating the random number. If you use the same seed to initialize, then the random output will remain the same.
To know the detail, you may refer: Python Random Seed
Example:
Code
import random as r
r.seed( 13 )
print("First iteration - ", r.randint(2, 40))
r.seed( 13 )
print("Second iteration - ", r.randint(2, 40))
Output
First iteration - 18
Second iteration - 18