Update 'randomPwd.py'

This commit is contained in:
sthope 2021-08-28 20:40:51 +02:00
parent 6f44daa58a
commit 3396a82e37
2 changed files with 21 additions and 20 deletions

21
randomPwd.py Normal file
View File

@ -0,0 +1,21 @@
import random
import string
def randomPwd(length):
chars = string.ascii_letters + string.digits
pwd = ''.join(random.choice(chars) for i in range(length))
print(pwd)
# 10 Random Passwords
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
randomPwd(18)
#######################

View File

@ -1,20 +0,0 @@
import random
import string
def random_password(length):
chars = string.ascii_letters + string.digits
password = ''.join(random.choice(chars) for i in range(length))
print(password)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)
random_password(18)