get a random number in python
April 17th, 2006 by Lawrence David
to sample from the uniform distribution between 0 and 1, you need to import the random module. then, simply call the random method:
>>> import random;
>>> rand_num = random.random()