【发布时间】:2014-07-24 00:09:29
【问题描述】:
我有一个字典列表,我需要从列表中的每个字典中提取某些键。
字典列表如下所示:
[{u'api_detail_url': u'http://www.giantbomb.com/api/platform/3045-94/', u'abbreviation': u'PC', u'site_detail_url': u'http://www.giantbomb.com/pc/3045-94/', u'id': 94, u'name': u'PC'}, {u'api_detail_url': u'http://www.giantbomb.com/api/platform/3045-35/', u'abbreviation': u'PS3', u'site_detail_url': u'http://www.giantbomb.com/playstation-3/3045-35/', u'id': 35, u'name': u'PlayStation 3'}, {u'api_detail_url': u'http://www.giantbomb.com/api/platform/3045-20/', u'abbreviation': u'X360', u'site_detail_url': u'http://www.giantbomb.com/xbox-360/3045-20/', u'id': 20, u'name': u'Xbox 360'}, {u'api_detail_url': u'http://www.giantbomb.com/api/platform/3045-86/', u'abbreviation': u'XBGS', u'site_detail_url': u'http://www.giantbomb.com/xbox-360-games-store/3045-86/', u'id': 86, u'name': u'Xbox 360 Games Store'}]
我将如何从那里取出所有“名称”键?
【问题讨论】:
标签: list python-2.7 dictionary