我知道我可以通过实现以下内容从右到左从数字中提取数字:
while (number => 10) digit = number modulo 10 number = number / 10
但是有没有一种方法可以从左到右做到与这个类似,只需使用模值之类的东西?
python math
math ×1
python ×1