Le Mon, 9 Feb 2009 13:45:04 -0800,
Marc Tompkins <[email protected]> a écrit :
> The print() function adds a newline. Try this instead - above your loop,
> create an empty string; in place of yor print(), append to the string; at
> the end, print the whole string.
>
> I'd demonstrate but I'm typing this from my phone.
import random, string
pool = string.digits + string.letters + string.punctuation
pw = ''
for i in range(8):
pw += random.choice(pool)
print pw
------
la vida e estranya
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor