Skip to content

Instantly share code, notes, and snippets.

@ShadowofZeus
Created December 9, 2019 11:34
Show Gist options
  • Save ShadowofZeus/20ed83f6f2a64df90b9e78920ced1db2 to your computer and use it in GitHub Desktop.
Save ShadowofZeus/20ed83f6f2a64df90b9e78920ced1db2 to your computer and use it in GitHub Desktop.
Exercise-16: Password Generator
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