PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import random, string
characters = (string.ascii_lowercase)
u_characters = (string.ascii_uppercase)
numbers = (string.digits)
special = ('#', '$', '_', '-', '?')
password = " "
spliter = "======================="
def pass_generate():
global characters
global u_characters
global numbers
global special
global password
length = int(input("How long do you want the password to be? "))
print(spliter)
while length > 0:
char_type = random.randint(0,3)
if char_type == 0:
new_char = random.choice(characters)
password += new_char
length -= 1
if char_type == 1:
new_char = random.choice(u_characters)
password += new_char
length -= 1
if char_type == 2:
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run