Skip to content

Instantly share code, notes, and snippets.

@imsickofmaps
Created July 18, 2018 07:11
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 imsickofmaps/73a9e6e3ab5830c9ad4687714ee33a6d to your computer and use it in GitHub Desktop.
Save imsickofmaps/73a9e6e3ab5830c9ad4687714ee33a6d to your computer and use it in GitHub Desktop.
import string
import random
def id_generator(size=4, chars=string.ascii_uppercase + string.ascii_lowercase + 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