Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Generate a random alphanumeric password of givem length:
- import random
- def passwordgenerator(x):
- password = []
- for i in range(x):
- password.append(random.choice("abcdefghijklmnopqrstuvwxyz1234567890"))
- #print(random.choice("abcdefghijklmnopqrstuvwxyz1234567890"))
- #password = password + (random.choice("abcdefghijklmnopqrstuvwxyz1234567890")
- i += 1
- return password
- password = ''.join(map(str, passwordgenerator(8)))
- print(password)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement