Posted By

ches on 09/12/07


Tagged

password python String


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

vasdee


Quick, Simple Password Generator


 / Published in: Python
 

Obviously there's no real crytpo here -- use this for cases like regenerating and emailing a user password.

  1. import string
  2. from random import choice
  3.  
  4. size = 9
  5. ''.join([choice(string.letters + string.digits) for i in range(size)])

Report this snippet  

You need to login to post a comment.