python divmod() 函数

python divmod() 函数

把除数和余数运算结果结合起来,返回一个包含商和余数的元组 (a // b, a % b)。
注意在 python 2.3 版本之前不允许处理复数。

python divmod() 函数