Skip to content

Commit de8e0b9

Browse files
Merge pull request #616 from sohamdata/passGen
Added random pass gen and resolved issue #615
2 parents fbdbb38 + fecb695 commit de8e0b9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Diff for: Python/passwordGenerator.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import random
2+
import string
3+
print("Welcome to the Password Generator!")
4+
total = string.ascii_letters + string.digits + string.punctuation
5+
length = int(input("How many characters would you like in your password? "))
6+
password = "".join(random.sample(total, length))
7+
print(f"Your secure password is: {password}")

0 commit comments

Comments
 (0)