def convert_base(N, b): """ convert_base(integer, integer) -> string Return the textual representation of N (decimal) in base 2 <= b <= 36. """ assert 2<=b<=36 if N==0: return "0" result = "" while N!=0: digit = N%b N = N//b #result = str(digit) + result result = "0123456789abcdefghijklmnopqrstuvwxyz"[digit] + result return result