Created
July 28, 2014 14:14
-
-
Save mscalora/d7c09de6394a6ffe60cb to your computer and use it in GitHub Desktop.
Token generator in python (1,0,o,O,i,I,l,L) eliminated, all 54 other alphanumerics used
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import string | |
import random | |
tchars = "abcdefghjkmnpqrstuvwxyZABCDEFGHJKMNPQRSTUVWXYZ23456789" | |
def token(length): | |
return ''.join(random.choice(tchars) for _ in range(length)) | |
print(token(6)) | |
print(token(8)) | |
print(token(10)) | |
print(token(12)) | |
print(token(14)) | |
print(token(16)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment