for构建多网址列表简写

urls=[
    f"https://www.cnblogs.com/sitehome/p/{page}"
    for page in range(1,5+1)
]
print(urls)

['https://www.cnblogs.com/sitehome/p/1', 'https://www.cnblogs.com/sitehome/p/2', 'https://www.cnblogs.com/sitehome/p/3', 'https://www.cnblogs.com/sitehome/p/4', 'https://www.cnblogs.com/sitehome/p/5']
上一篇:[20130104]快速移动数据文件.txt


下一篇:在Eclipse下搭建Android开发环境教程