Python divmod() 函数 python divmod() 函数把除数和余数运算结果结合起来,返回一个包含商和余数的元组(a // b, a % b)。 函数语法 divmod(a, b) 参数说明: a: 数字b: 数字 示例代码: