python random string
import secrets
secrets.token_hex(nbytes=16)
# this will produce something like
# aa82d48e5bff564f3221d02194611c13
python random string
import secrets
secrets.token_hex(nbytes=16)
# this will produce something like
# aa82d48e5bff564f3221d02194611c13
python random password generator
import random
alph = list('ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
1234567890 !@#$%^&*(){}[]<>,.')
out = ''
for char in string:
out += random.choice(alph)
print(out)
python random password generator
import random
print("Welcome to your own password Generator")
cherecters_for_Genarating_password = ("1234567890qwertyuiopasdfghjklzxcvnmQWERTYUIOPASDFGHJKLZXCVNM*&%$#@!")
try:
TO_GENERATE = int(input("How many passwords you have to create:- "))
#print(TO_GENERATE)
Length_of_password = int(input("What should be the lenth of your password:- "))
print("So these are your passwords:- ")
#main code
for passw in range(TO_GENERATE+1):
print(" or")
password = ""
for should_apply in range (Length_of_password):
password += random.choice(cherecters_for_Genarating_password)
print(password)
print("Are these passwords satisfing you Y/N")
satisfing = str(input())
if satisfing == "Y" or satisfing == "y":
print("Ok sir Thanks")
elif satisfing == "N" or satisfing == "n":
print("So these are your passwords Again:- ")
for passw in range(TO_GENERATE):
password = ""
for should_apply in range (Length_of_password):
password += random.choice(cherecters_for_Genarating_password)
print(password)
else:
print("incorrect input")
except ValueError:
print("Incorrect input Sorry")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us