# 數字轉各類進制, 輸出字符 def toStr(n,base): converString = "0123456789ABCDEF" if n < base: return converString[n] return toStr(n//base, base) + converString[n%base]