【发布时间】:2018-03-04 01:47:28
【问题描述】:
目标:将字符串列表转换为字典列表
我有以下字符串列表
info = ['{"contributors": null, "truncated": true, "text": "hey there"}',
'{"contributors": null, "truncated": false, "text": "how are you"}',
'{"contributors": 10, "truncated": false, "text": "howdy"}']
期望的输出:
desired_info = [{"contributors": null, "truncated": true, "text": "hey there"},
{"contributors": null, "truncated": false, "text": "how are you"},
{"contributors": 10, "truncated": false, "text": "howdy"}]
问题:如何将字符串列表转换为字典列表?
【问题讨论】:
标签: python string dictionary