[Tutor] Letters vs. numbers

Ed Gaitan ed18hg at bellsouth.net
Sun Oct 24 16:20:07 CEST 2004


I am creating MD5 hashes from a range of numbers. This works fine:


for i in xrange(10):

    import md5

     m = md5.new()

     m.update("%i" % i)

     print "i=",i,"md5(i)=",m.hexdigest()


But now I want to output a 5 character combination of lower case letters and
0-9 digits. Is there a function that combines both and then I put the
variable into the md5() function? Any bit of help would be appreciated.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20041024/880cb265/attachment.html

More information about the Tutor mailing list