python基本进制转换代码,适用于2进制到36进制转换
# Parsing string with base into a number is easy num = int(str, radix) # We have to write our own function for outputting to string with arbitrary base def itoa(num, radix): result = "" while num > 0: result = "0123456789abcdefghijklmnopqrstuvwxyz"[num % radix] + result num /= radix return result