# -*-coding: utf-8-*- keys = [‘name‘, ‘age‘, ‘tel‘] values = [‘aqi‘, 3, 123456] dict1 = dict(zip(keys, values)) print dict1 ‘‘‘ {‘age‘: 3, ‘tel‘: 123456, ‘name‘: ‘aqi‘} ‘‘‘
另外一种实现方式,使用lambda函数:
dict2 = dict(map(lambda x,y:[x,y], keys, values))
原文:https://www.cnblogs.com/v5captain/p/13817089.html