demo_ref_random_seed2.py:
import random random.seed(10) print(random.random()) random.seed(10) print(random.random())
➜ begtut>python demo_random_seed2.py
0.5714025946899135
0.5714025946899135