list函数
>>> a = list()
>>> a
[]
>>> b = 'i love fishc.com'
>>> b
'i love fishc.com'
>>> b = list(b)
>>> b
['i', ' ', 'l', 'o', 'v', 'e', ' ', 'f', 'i', 's', 'h', 'c', '.', 'c', 'o', 'm']
>>> c = (1, 1, 2, 3, 5, 8, 13, 21,34,)
>>> c
(1, 1, 2, 3, 5, 8, 13, 21, 34)
>>> c = list(c)
>>> c
[1, 1, 2, 3, 5, 8, 13, 21, 34]
>>> max(b)
'v'
max和min函数
>>> chars = 'ss235fg22z'
>>> max(chars)
'z'
>>> min(chars)
'2'
>>> numbers = [1,2,4,32]
>>> sum(numbers)
39
sorted函数和reverse函数
>>> numbers = [1,2,4,32,23,43,21]
>>> sorted(numbers)
[1, 2, 4, 21, 23, 32, 43]
>>> list(reversed(numbers))
[21, 43, 23, 32, 4, 2, 1]
enumerate函数和zip函数
>>> list(enumerate(numbers))
[(0, 1), (1, 2), (2, 4), (3, 32), (4, 23), (5, 43), (6, 21)]
>>> a = [2,4,1,4,6]
>>> b = [3,4,2,5]
>>> list(zip(a,b))
[(2, 3), (4, 4), (1, 2), (4, 5)]