python一行命令将两个列表合并成字典
all_id=["id","name","age"]
all_value=["12","kuang","22"]
dic = dict(map(lambda x, y: [x, y], all_id, all_value))
print(dic)
输出:{'id': '12', 'name': 'kuang', 'age': '22'}
all_id=["id","name","age"]
all_value=["12","kuang","22"]
dic = dict(map(lambda x, y: [x, y], all_id, all_value))
print(dic)
输出:{'id': '12', 'name': 'kuang', 'age': '22'}