[Tutor] When I print random.random

bob gailer bgailer at gmail.com
Sat Jan 15 06:42:13 CET 2011


Please always reply to the list, not just to me.

On 1/14/2011 10:42 PM, walter weston wrote:
> I want a whole number thats 5 digits long, I want to use it as a 
> password and if I just type random.random() I get a long float.

random.randint(a, b)
Return a random integer N such that a <= N <= b.


-- 
Bob Gailer
919-636-4239
Chapel Hill NC

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110115/9f04bb29/attachment.html>


More information about the Tutor mailing list