Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b0f02ce

Browse files
Password Generator
1 parent 32960e7 commit b0f02ce

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎Password_Generator/passowrd_gen.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import string
2+
import random
3+
4+
def gen():
5+
s1 = string.ascii_uppercase
6+
s2 = string.ascii_lowercase
7+
s3 = string.digits
8+
s4 = string.punctuation
9+
10+
passlen = int(input("Enter the Password Length: "))
11+
12+
s = []
13+
s.extend(list(s1))
14+
s.extend(list(s2))
15+
s.extend(list(s3))
16+
s.extend(list(s4))
17+
18+
random.shuffle(s)
19+
pas = ("".join(s[0:passlen]))
20+
print(pas)
21+
22+
gen()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /