+ 1

How work random.seed() in Python

Who can say me how this work?

9th Feb 2018, 8:29 AM
Š“Š»ŠµŠ± Š¢Š¾Šŗ
Š“Š»ŠµŠ± Š¢Š¾Šŗ - avatar
1 Answer
+ 10
The random module uses the ā€œMersenne Twister: A 623-dimensionally equidistributed uniform pseudorandom number generatorā€. random.seed() initializes the generator. The default starting value is the system time. See https://docs.python.org/3/library/random.html You can read the source code here https://github.com/python/cpython/blob/3.6/Lib/random.py Thanks for asking the question - I learned something! šŸ˜Š
9th Feb 2018, 9:32 AM
David Ashton
David Ashton - avatar