/ Published in: Python
Example Usage:
========
print generatePassword(length = 20, using = "10")
print generatePassword(length = 8)
print generatePassword()
Output:
--------
01011110010011000100
z&v^9?dx
+=z?=)vene
========
print generatePassword(length = 20, using = "10")
print generatePassword(length = 8)
print generatePassword()
Output:
--------
01011110010011000100
z&v^9?dx
+=z?=)vene
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def generatePassword(length = 10, using = "123456789qwertyuioplkjhgfdsazxcvbnm!£$%^&*()_+-=:@?><"): random.seed() password = "" for i in range(0, length): password = password + using[random.randrange(0, len(using))] return password