想象一下,你有:
keys = ['name', 'age', 'food'] values = ['Monty', 42, 'spam']
生成以下字典的最简单方法是什么?
a_dict = {'name' : 'Monty', 'age' : 42, 'food' : 'spam'}
python dictionary list
dictionary ×1
list ×1
python ×1