question about random number generation

Lu.Fan at Lu.Fan at
Fri Sep 10 19:37:38 CEST 2004

Dear All,
I'm a newbie in Python. I have a question about the random number 
generation in Python vs. Java. 
We have a system developed in Python. Now I'm writing tests in Java 
(actually a Java wrapper) to test it. I need to duplicate a random number 
generation process in my test which means that given the same seed I 
expect the same result in Java as in Python. As far as I know, Python uses 
the Mersenne Twister RNG --- correct me if I am wrong. Do Python and Java 
use the same RNG?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list