>>> list1 = ['a','b','c','d','e']
>>> list1.pop()
'e'
>>> print(list1)
['a', 'b', 'c', 'd']
>>> list1.pop(0)
'a'
>>> print(list1)
['b', 'c', 'd']
8.remove(),删除指定元素
>>> list1 = ['a','b','c','d','e']
>>> list1.remove('a')
>>> print(list1)
['b', 'c', 'd', 'e']
9.reverse(),反转列表
>>> list1 = ['a','b','c','d','e']
>>> list1.reverse()
>>> print(list1)
['e', 'd', 'c', 'b', 'a']
10.sort(),对列表进行排序,字符串跟数字不能直接进行排序
>>> list1 = ['a','d','b','c']
>>> list1.sort()
>>> print(list1)
['a', 'b', 'c', 'd']
>>>
>>> list2 = ['a',1,'2','d']
>>> list2.sort()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unorderable types: int() < str()
Ubuntu 14.04安装Python 3.3.5
CentOS上源码安装Python3.4
《Python核心编程 第二版》.(Wesley J. Chun ).[高清PDF中文版]