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