Initial Commit

This commit is contained in:
hellisabove
2022-01-27 20:58:05 +02:00
commit 07ea08974e
3 changed files with 93 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env python3
import random
import string
length = int(input('Enter length of password: '))
#define data
lower = string.ascii_lowercase
upper = string.ascii_uppercase
num = string.digits
symbols = string.punctuation
#combine the data
all = lower+upper+num+symbols
#randomize beetwen data and length
temp = random.sample(all,length)
#create the password
password = "".join(temp)
f= open("password.txt","w+")
f.write(password)
f.close()
print('Your password, ' + password + ' has been saved in the file password.txt')