课程
/后端开发
/Python
/初识Python
L = range(1, 101)
print L[-10:]
print L[4::5][10:]
2020-02-28
源自:初识Python 8-2
正在回答
print L[4::5] [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
print L[4::5][-10:]
[91, 92, 93, 94, 95, 96, 97, 98, 99, 100] [55, 60, 65, 70, 75, 80, 85, 90, 95, 100]
WE_Xing
L = range(1, 15) print L[10:] print L[-10:] [11, 12, 13, 14] [5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
当然不一样啊
举报
学python入门视频教程,让你快速入门并能编写简单的Python程序