unique key from digits
from string import digits, asciiletters
CHARACTERS = digits + asciiletters
BASE = len(CHARACTERS)
def makekey(num):
rem, res = divmod(num, BASE)
return ''.join(('' if rem == 0 else makekey(rem), CHARACTERS[res]))
</premake_key(999999999999999999999999999999999999999999999999)
'oZyzW6z4fUKCLNHzK549zqsBKI7'
Written by gmist
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Related Tags
#python
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#