Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from string import ascii_letters , digits
- from random import choice
- longitud = int(input("Escribe que tipo de longitud deseas para generar la clave:"))
- cuantas = int(input("Escribe cuantos tipos de contraseña deseas generar:"))
- numeros = ascii_letters + digits
- espacio = ''
- a = 1
- while a<=cuantas:
- final = espacio.join([choice(numeros) for i in range(longitud)])
- print (final)
- a = a + 1
Advertisement
Add Comment
Please, Sign In to add comment