python allows conversions from string to integer using any base in the range [2,36] using:
int(string,base)
im looking for an elegant inver
Here is a recursive function:
def encode(nIn, nBase): n = nIn // nBase s = '0123456789abcdefghijklmnopqrstuvwxyz'[nIn % nBase] return encode(n, nBase) + s if n > 0 else s n = 1577858399 s = encode(n, 36) print(s == 'q3ezbz')