摘要: #切片补充 a=[1,2,3,4,5,6,7,8] print(a[::2])#隔一个取一个元素 [1, 3, 5, 7] print(a[::-1])#将列表或元祖颠倒过来 [8, 7, 6, 5, 4, 3, 2, 1] b=tuple(a) print(b)#(1, 2, 3, 4, 5, 6, 7, 8) print(b[::2])#(1, 3, 5, 7) print(b[::... 阅读全文
posted @ 2018-03-20 10:16 耐烦不急 阅读(255) 评论(0) 推荐(0) 编辑