I am a bit confused on what random.seed()
does in Python. For example, why does the below trials do what they do (consistently)?
>>> i
Imho, it is used to generate same random course result when you use random.seed(samedigit)
again.
In [47]: random.randint(7,10)
Out[47]: 9
In [48]: random.randint(7,10)
Out[48]: 9
In [49]: random.randint(7,10)
Out[49]: 7
In [50]: random.randint(7,10)
Out[50]: 10
In [51]: random.seed(5)
In [52]: random.randint(7,10)
Out[52]: 9
In [53]: random.seed(5)
In [54]: random.randint(7,10)
Out[54]: 9