Integer to string with given radix Write the shortest function to convert an integer into a numeric representation given a radix between 2 and 62. e.g.:

to_string(351837066319, 31) =&gt; "codegolf"
Python - 86
 
from string import*
def t(n,r,s=''):
 while n:s=printable[n%r]+s;n/=r
 return s or'0'

Credit due to Hoa Long Tam for the string import trick