Skip to content

Instantly share code, notes, and snippets.

@JagDecoded
Created June 18, 2017 20:10
Show Gist options
  • Save JagDecoded/e05b759604d4b660b033e55922e84e48 to your computer and use it in GitHub Desktop.
Save JagDecoded/e05b759604d4b660b033e55922e84e48 to your computer and use it in GitHub Desktop.
import random
def password():
password_length=random.randint(8,18)
password_string='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.*_!@#$%^&'
for i in range(1,password_length):
print (random.choice(password_string),end='')
def gen_another():
generate_another=input("\nto generate another password enter 'y' : ").lower()
while generate_another=='y':
password()
generate_another=input("\nto generate another password enter 'y' : ").lower()
password()
gen_another()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment