摘要:
Python Tips, 持续更新中... Python Slicing 序列切片代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->In [1]: l = [1,2,3,4]In [2]: l[1:3]Out[2]: [2, 3]In [4]: l[1:] //省略结束Out[4]: [2, 3, 4]In [5]: l[:2] //省略开始Out[5]: [1, 2]In [8]: l[::-1] //基数倒排序Out[8]: [4, 3 阅读全文