Skip to content

Instantly share code, notes, and snippets.

@yxy
Created February 12, 2018 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yxy/af43aab67acdcb4094fa570343936f9a to your computer and use it in GitHub Desktop.
Save yxy/af43aab67acdcb4094fa570343936f9a to your computer and use it in GitHub Desktop.
random string
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