【发布时间】:2017-05-24 16:53:16
【问题描述】:
我有一个类似的列表:
x = ['user=inci', 'password=1234', 'age=12', 'number=33']
我想将 x 转换为如下的字典:
{'user': 'inci', 'password': 1234, 'age': 12, 'number': 33}
最快的方法是什么?
【问题讨论】:
标签: python python-2.7 list dictionary type-conversion