Created
February 12, 2018 13:37
-
-
Save yxy/af43aab67acdcb4094fa570343936f9a to your computer and use it in GitHub Desktop.
random string
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
import string | |
import random | |
def id_generator(size=64, chars=string.ascii_uppercase + string.digits): | |
return ''.join(random.choice(chars) for _ in range(size)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment