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)}
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)}