Random Generator

Just wondering here, but how does python generate a random number. I was talking to my dad a few days ago about this, asking what’s the algorithem for generating random numbers. He’s a computer scientist btw, he said that some random actuators uses things on your computer then change all the time, for example: The time multipled, squared, divided, ect, ect. Then you will get a random number… Almost, but it seems like it.

I want to know exactly how python generates random numbers, if anybody knows, I’ll be glad to hear!

Thanks for the help guys!
Linkxgl

Python random doc pages: http://docs.python.org/library/random.html
Algorithm used: http://en.wikipedia.org/wiki/Mersenne_twister

To my knowledge, it gets some value from your computer, most recent keys pressed, whatever, then converts it to a number. Then it does stuff from there.

interesting! Very cool! Thanks for the links mandoragon! From what I understand that’s what I think also, Fake, thanks guys.