python命名切片

命名切片

c = slice(2, 5)
a = [1, 2, 3, 4, 5, 6, 7]
print(a[c])
posted @ 2020-12-09 14:30  rm-rf*  阅读(102)  评论(0编辑  收藏  举报