# 数字转各种进制, 输出字符def toStr(n,base): converString = "0123456789ABCDEF" if n < base: return converString[n] return toStr(n//base, base) + converString[n%base]
本文共 218 字,大约阅读时间需要 1 分钟。
# 数字转各种进制, 输出字符def toStr(n,base): converString = "0123456789ABCDEF" if n < base: return converString[n] return toStr(n//base, base) + converString[n%base]
转载于:https://my.oschina.net/u/243080/blog/265551