Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hacktoberfest2022 #208

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions password.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# "password Generator"
# generator password of 12 characters
# 4 with small, 4 cap, 2 disital 2 special char
import string as s
from random import randint, sample
c_lower = s.ascii_lowercase
print("lowercase:",c_lower)
c_upper = s.ascii_uppercase
print("uppercase:",c_upper)
c_digits = s.digits
print("digits:",c_digits)
c_special = s.punctuation
print("special:",c_special)
cl = sample(c_lower,3); print(cl)
cu = sample(c_upper,1); print(cu)
cd = sample(c_digits,3); print(cd)
cs = sample(c_special,1); print(cs)

c = cl+cu+cd+cs
print(c)
password_new="".join(sample(c,8))
print("\password by @saurav = ", password_new)