Skip to content

Instantly share code, notes, and snippets.

@4383
Created March 29, 2018 12:38
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 4383/b3c4c2eca1d58d4cb89e989db1309ee6 to your computer and use it in GitHub Desktop.
Save 4383/b3c4c2eca1d58d4cb89e989db1309ee6 to your computer and use it in GitHub Desktop.
Minify url algorithme with python
import random
choices = range(48, 57)
choices.extend(range(65, 90))
choices.extend(range(97, 122))
chr_identifier = ""
int_identifier = ""
for el in range(0, 6):
chr_identifier += chr(random.choice(choices))
int_identifier += str(random.choice(choices))
print(chr_identifier)
print(int_identifier)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment