diff --git a/Password Generator/README.md b/Password Generator/README.md new file mode 100644 index 0000000..e6045ae --- /dev/null +++ b/Password Generator/README.md @@ -0,0 +1,2 @@ +# Random Password Generator +A simple Python script that generates secure, random passwords using the random and string libraries. diff --git a/Password Generator/randompassword.py b/Password Generator/randompassword.py new file mode 100644 index 0000000..5e1cc0f --- /dev/null +++ b/Password Generator/randompassword.py @@ -0,0 +1,9 @@ +import random +import string + +def generate_password(length=12): + characters = string.ascii_letters + string.digits + string.punctuation + password = ''.join(random.choice(characters) for i in range(length)) + return password + +print("Random Password:", generate_password())