def page_helper(my_list, current_page=1, page_size=10): start = (current_page - 1) * page_size end = start + page_size return {'rows': my_list[start:end], 'total': len(my_list)}
python实现简单的分页函数
猜你喜欢
转载自blog.csdn.net/qq_30966497/article/details/96437751
今日推荐
周排行