Random passwords generation (Python vs Perl) =)

Olexandr Melnyk omelnyk at gmail.com
Mon Jan 29 00:18:34 EST 2007


2007/1/29, Leif K-Brooks <eurleif at ecritters.biz>:
>
> NoName wrote:
> > from random import choice
> > import string
> > print ''.join([choice(string.letters+string.digits) for i in
> > range(1,8)])
> >
> > !!generate password once :(
>
> So add a while true: line.
>
> > who can write this smaller or without 'import'?


Being very short in price of readability isn't one of the Python's main
goals.

--------------------------------
Olexandr Melnyk,
http://omelnyk.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070129/562a8f70/attachment.html>


More information about the Python-list mailing list