# 分页显示 divmod(被除数,除数)
INFO_LIST = []
for i in range(836):
template = "第%s天,笨笨先僧 always be there with you" % i,
# print(template)
INFO_LIST.append(template)
per_page_count = 10
total_page, rem = divmod(836, per_page_count)
if rem > 0:
total_page = total_page + 1
# 计算出总页数
# 输入页数 显示
while True:
val = input("请输入页数:")
val = int(val)
if val>total_page_count or val<1
start = (val - 1) * per_page_count
end = val * per_page_count
for ele in range(start, end):
print(INFO_LIST[ele])
相关文章
- 01-12在web中的分页操作
- 01-12react+antd 点击分页为上次操作结果
- 01-12day11.3分页操作divmod
- 01-12Django的页面分页操作
- 01-12自制MVC框架CRUD操作、列表、分页显示插件介绍
- 01-12SQL临时表加分页操作
- 01-12pagehelper分页操作
- 01-12sql分页操作
- 01-12自做 数据分页,执行SQL操作数据分页,SQL 分页
- 01-12对datatable操作经验-排序和分页