📜  python 将 int 分隔成数字数组 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:43.982000             🧑  作者: Mango

代码示例2
pythonCopyimport math
n = 13579
x = [(n//(10**i))%10 for i in range(math.ceil(math.log(n, 10))-1, -1, -1)]
print(x)
# [1, 3, 5, 7, 9]