Create "Suggest Strong Password" in Python


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()
Python

Comments

Popular posts from this blog

Quotation marks to wrap an element in HTML

Making GUI Calculator in Tkinter Python

Unlocking Web Design: A Guide to Mastering CSS Layout Modes