http://stackoverflow...ters-and-digits
Which is all fine and good but when I tried it I set it up a little different. I set it up as such:
import random, string
def idgen(size=8, chars=string.ascii_letters + string.digits):
newpass = ''
for x in range(size):
newpass.join(random.choice(chars))
return newpass
print(idgen())
My code gives me no output but the one linked does. Am I not understanding something about the code and strings in general?

New Topic/Question
Reply



MultiQuote



|