Python allows easy creation of an integer from a string of a given base via
int(str, base).
I want to perform the inverse: creati
def baseConverter(x, b): s = "" d = string.printable.upper() while x > 0: s += d[x%b] x = x / b return s[::-1]