Password generator in Python

import string from random import * characters = string.ascii_letters + string.punctuation + string.digits password = "".join(choice(characters) for x in range(randint(8, 16))) print password
You can use Python's string and random modules to generate passwords.

The string module contains a number of useful constants and classes.

#python #script #passwordGenerator #password

#cesarnog

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.