What is the seed(x) function in Python 3?

Can someone very simply explain what the purpose and function of the seed(x) function are in Python 3?

I am trying to figure out what the random.seed(0) line is supposed to do in this code. I understand every other line except for that one.

# random module is imported 
import random  
for i in range(5): 
  
    # Any number can be used in place of '0'. 
    random.seed(0) 
  
    # Generated random number will be between 1 to 1000. 
    print(random.randint(1, 1000))

From the documentation:

How familiar are you with pesudo-random number generation? All pesudo-random number generators need some sort of seed value to start the calculation of a pesudo-random number.

Hi!

Try to run the code with seed() and without it and you will see the difference!

Examples:
seed(0): (same random numbers).
865
865
865
865
865

Without seed(): (different random numbers).
378
988
308
672
171