Python 内建函数
显示 5 除以 2 的商和余数:
x = divmod(5, 2)
运行实例
divmod() 函数返回当参数 1 除以参数 2 时包含商和余数的元组。
divmod(divident, divisor)