import string
import random
def suggest_strong_password():
characters = list(string.ascii_letters + string.digits + string.punctuation)
# print(characters)
# print(type(characters))
random.shuffle(characters)
# print(characters)
pass_length = int(input("How long your password should be? "))
password = []
for i in range(0, pass_length):
password.append(random.choice(characters))
# print(password)
random.shuffle(password)
# print(password)
final_password = "".join(password)
print(final_password)
suggest_strong_password()
Comments
Post a Comment
Write something to CodeWithAbdur!