Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Gather the required runctions
- from random import randint
- #Define the function
- def passwordL(length):
- for i in range(length):
- value = randint(33, 126) #ASCII Characters
- print(str(chr(value)), end ="")
- return()
- #here is the programme
- passLen = input('Required password length: ')
- print('Your password is: ')
- ranPassword = passwordL(int(passLen))
- print('')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement