Random passwords generation (Python vs Perl) =)

Leif K-Brooks eurleif at ecritters.biz
Mon Jan 29 00:09:48 EST 2007


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'?

Why are those your goals?



More information about the Python-list mailing list