Advertisement
g0thy

Password

Dec 3rd, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. #Gather the required runctions
  2. from random import randint
  3.  
  4. #Define the function
  5. def passwordL(length):
  6.     for i in range(length):
  7.         value = randint(33, 126)    #ASCII Characters
  8.         print(str(chr(value)), end ="")      
  9.     return()
  10.  
  11. #here is the programme    
  12. passLen = input('Required password length: ')
  13. print('Your password is: ')
  14. ranPassword = passwordL(int(passLen))
  15. print('')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement