------------------------------------------------------------
In [204]: print l1
[0, 1, 2, 3, 4, 5, 6]...Fri', 'Sat']
In [206]: zip (l1,l2)
Out[206]:
[(0, 'Sun'),
(1, 'Mon'),
(2, 'Tue'),
(3, 'Web'),
(4,...]: d2=zip (l1,l2)
In [208]: d3=dict(d2)
In [209]: print d3
{0: 'Sun', 1: 'Mon', 2: 'Tue', 3: 'Web', 4:...---------------------------------------
zip 可以这样:
In [219]: zip (['x','y','z'],l2)
Out[219]: [('x', 4)..., ('y', 5), ('z', 6)]
In [220]:
In [220]: print l2
[4, 5, 6]