jonay

otro generador

Dec 6th, 2014
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. from string import ascii_letters , digits
  2. from random import choice
  3.  
  4. longitud = int(input("Escribe que tipo de longitud deseas para generar la clave:"))
  5. cuantas = int(input("Escribe cuantos tipos de contraseña deseas generar:"))
  6. numeros = ascii_letters + digits
  7. espacio = ''
  8. a = 1
  9. while a<=cuantas:
  10.         final = espacio.join([choice(numeros) for i in range(longitud)])
  11.         print (final)
  12.         a = a + 1
Advertisement
Add Comment
Please, Sign In to add comment