Created
June 18, 2017 20:10
-
-
Save JagDecoded/e05b759604d4b660b033e55922e84e48 to your computer and use it in GitHub Desktop.
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 | |
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