Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random as rn
- def pwdGen(myLen):
- pwd = ''
- for x in range(myLen):
- ch = rn.randint(1,3)
- if ch ==1:
- pwd = pwd + rn.choice('qwertyuiopasdfghjklzxcvbnm')
- elif ch ==2:
- pwd = pwd + rn.choice('QWERTYUIOPASDFGHJKLZXCVBNM')
- else:
- pwd = pwd + str(rn.randint(0,9))
- return pwd
- print '\nYour password is\n' + str(pwdGen(10))
Add Comment
Please, Sign In to add comment