PW Akshay

Generation

generate functionMon, 28 Nov 2022

password generator using random module (no function)

import random letters = "abcdefghijklmnopqrstuvwxyz" uppercase_letters = letters.upper() numbers = "0123456789" symbols = "!@#$%^&*()_+-=:;?><,.{}[]" all = letters + uppercase_letters + numbers + symbols password_length = int(input("What's the length of the password? ")) password = "" for i in range(password_length): password += random.choice(all) print(password)

Questions about programming?Chat with your personal AI assistant