All pastes #247736 Raw Edit

Something

public python v1 · immutable
#247736 ·published 2006-11-13 20:39 UTC
rendered paste body
def dectobase(base, number):        symb=["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"]        global tb        def tb(b, n, result=''):                if n == 0: return result                else :                        while n > b:                                r = symb[n%b] + result                                n = n/b                return tb(b, n/b, str(n%b) + result) + r