numpy.random.seed(42)
# random module is imported import random # 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))