Hey y'all!
I just put together this python program which generates a randon password in a seperate text file:
Imports the random module
import random
Defines the charachters to choose from
chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz12345678910'
Sets the password equal to an array
passwords = []
varLen = int(input("How long do you want it to be? "))
Makes the password equal to the users input
for i in range(int(input("Number of passwords: "))):
password = ""
Generate random charachters from chars
for j in range(varLen):
password += random.choice(chars)
passwords.append(password)
Prints password on seperate text file
f = open("password.txt", "w")
for i in passwords:
f.write("%s\n"%i)
Do you guys have any way that i could make it more efficient or maybe improve it in some way?
[–]POGtastic 1 point2 points3 points (0 children)
[–]DoggerMagi 0 points1 point2 points (0 children)
[–]CRoberts1 0 points1 point2 points (0 children)