Answers for "python safe password string generator"

3

password generator python

#This is giving you a password with 8 strings and 4 numbers:
import random
i=0 
list=[]
while i < 12:
    while i < 8:
        list.append(random.choice(string.ascii_letters))
        i+=1
    while i < 12:
        list.append(random.randint(0, 9))
        i+=1
    
list=' '.join([str(elem) for elem in list])
print("Your new password: ", list.replace(" ", ""))
Posted by: Guest on November-13-2020
0

python safe password string generator

# 32 characters 16 letters 14(remaining) integers
import random
import string
i=0 
list_p=[]
while i < 32:
    while i < 18:
        list_p.append(random.choice(string.ascii_letters))
        i+=1
    while i < 32:
        list_p.append(random.randint(0, 9))
        i+=1
stringified_list = [str(i) for i in list_p]
random.shuffle(stringified_list)
new_password = "".join(stringified_list)
Posted by: Guest on January-18-2021

Code answers related to "python safe password string generator"

Python Answers by Framework

Browse Popular Code Answers by Language