分别取商和余数:divmod(a, b) 使用函数:divmod(a, b)可以实现分别取商和余数的操作: >>> divmod(123,3) (41, 0) >>> divmod(200,6) (33, 2) >>>