list1 = [1,2,3]
list2 = [4,5,6]
list3 = [7,8,9]
zip(list1,list2,list3)
list1 = [1,2,3]
list2 = [4,5,6,7]
zip(list1,list2)
[(1,4),(2,5),(3,6)]
list1 = [1,2,3]
zip(list1)
[(1,),(2,),(3,)]
zip()
a = dict()#创建空字典
print(a)
b = dict(a=1,b=2,c=3)
print(b)
c = dict({‘three‘: 3, ‘four‘: 4})
print(c)
d = dict([(‘one‘, 1), (‘two‘, 2), (‘three‘, 3)])
print(d)
原文:https://www.cnblogs.com/niusha/p/10385574.html