>>> lst=[1,2,3,4,5,6]
>>> lst[0:4]
[1, 2, 3, 4]
>>> lst[0:4:1]
>>> lst[0:4:2]
[1, 3]
>>> lst[4:1:-1]
[5, 4, 3]
倒数第二行的返回值不能理解,可否说明下,谢谢了
tanhouyusheng
相关分类