摘要: 切片切片是因为在实际情况中,我们往往只要求取list或者tuple的部分元素,从而提出了切片这种特性。L = ['a','b','c','d','e','f','g','h']r1 = L[:2]r2 = L[2:5]r3 = L[-4:]r4 = L[-4:-2]print(r1)... 阅读全文
posted @ 2015-08-17 13:12 mlhy 阅读(150) 评论(0) 推荐(0) 编辑