Skip to content

Commit 4c803dd

Browse files
authored
Add files via upload
1 parent a486ecc commit 4c803dd

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

PasswordGenerator_pawarspeaks.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import string
2+
import random
3+
from typing import List
4+
5+
if __name__ == "__main__":
6+
7+
s1 = string.ascii_lowercase
8+
s2 = string.ascii_uppercase
9+
s3 = string.digits
10+
s4 = string.punctuation
11+
12+
plen = int(input("Enter password length\n"))
13+
14+
s = []
15+
s.extend(list(s1))
16+
s.extend(list(s2))
17+
s.extend(list(s3))
18+
s.extend(list(s4))
19+
20+
random.shuffle(s)
21+
22+
print("Your password is: ")
23+
print("".join(s[0:plen]))
24+

0 commit comments

Comments
 (0)