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 e3975e5

Browse files
Merge pull request #1 from Humzafazal72/Humzafazal72-patch-1
Create password.py
2 parents 6d1400f + 27cd184 commit e3975e5

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎password.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import random
2+
import string
3+
4+
def generate_password(length=12):
5+
characters = string.ascii_letters + string.digits + string.punctuation
6+
password = ''.join(random.choice(characters) for _ in range(length))
7+
return password
8+
9+
# Example: Generate a random password of length 12
10+
password = generate_password()
11+
print("Random Password:", password)

0 commit comments

Comments
(0)

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