标签:pre zip 元素 one https 构造 uil 教程 迭代
菜鸟教程:https://www.runoob.com/python/python-built-in-functions.html
a = [1,2,3]
b = [4,5,6]
zipped = zip(a,b) # 打包为元组的列表
[(1, 4), (2, 5), (3, 6)]
dict(zip(['one', 'two', 'three'], [1, 2, 3])) # 映射函数方式来构造字典
{'three': 3, 'two': 2, 'one': 1}
标签:pre zip 元素 one https 构造 uil 教程 迭代
原文地址:https://www.cnblogs.com/oklizz/p/12240773.html