Last active
December 21, 2015 11:19
-
-
Save uzegonemad/6298079 to your computer and use it in GitHub Desktop.
Generate Short URL... It's my first day in Python
This file contains hidden or 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
from random import choice | |
from string import (ascii_letters, digits) | |
def generateLinkSlug(length = 6): | |
return "".join([choice(ascii_letters + digits) for x in xrange(length)]) | |
print generateLinkSlug() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment