Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an alternative for the random module in Python?

Tags:

python

I was using Trypython.org, and found that there was no random module included, so got curious.

Is there an alternative method to generate random numbers within a certain range without importing random?

like image 434
mankand007 Avatar asked May 15 '26 19:05

mankand007


1 Answers

Generating random, or rather pseudo-random numbers is tricky business and it's best to stick to the default libraries. I would recommend you bite the bullet and download Python 2.7.2 or 3.2.3 and then you can play around with any other libraries not included by trypython as well.

like image 117
Max Spencer Avatar answered May 17 '26 08:05

Max Spencer