chave única de dígitos



da string importar dígitos,
letras
ascii
CHARACTERS = dígitos +
letras ascii


BASE = len (CHARACTERS)


def make
key (num):

rem, res = divmod (num, BASE)


return '' .join (('' if rem == 0 senão faça a
chave (rem), CARACTERES [res]))

</ pré




make_key (99999999999999999999999999999999999999999999999999)

'oZyzW6z4fUKCLNHzK549zqsBKI7'