l = [ [1,2,3], [2,3,4] ]
map(list,*l)
for row in map(list,zip(*l)):
print(row)
结果[1, 2], [2, 3], [3, 4]
import collections
l = [1,2,1,2,3]
c = collections.Counter(l)
结果c = {'1':2,'2':2,'3':1}
s = 'apple'
collections.Counter(s)
{'a':1, 'p':2, 'l':1, 'e':1}
import copy
a = [1,2]
b = copy.deepcopy(a)
复制的列表和原列表不会相互影响