Created
December 9, 2019 11:34
-
-
Save ShadowofZeus/20ed83f6f2a64df90b9e78920ced1db2 to your computer and use it in GitHub Desktop.
Exercise-16: Password Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import string | |
def strongpassgenerator(password_length=12): | |
alphanum = string.ascii_letters + string.digits | |
return ''.join(random.choice(alphanum) for i in range(password_length)) | |
print ("Kindly enter the password length to be generated") | |
pass_length=int(input("I will not allow a value less than 12 please: ")) | |
print ("Your generated password is: ", strongpassgenerator(pass_length)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment