Python divmod方法

有95条数据 每十条存一页

all_item = 95

pager = 10 

result = all_item.__divmod__(pager)

print(result)

(9{商},5{余数})

posted @ 2018-06-04 22:16  Presley  阅读(389)  评论(0编辑  收藏  举报