我有一本这样的python字典
products = {'results': {'images': 'http://static13.jassets.com/p/Gini-26-Jony-Green-Casual-Shirt-9007-7386721-4-zoom.jpg', 'offers': {}, 'name': ['\n Green Casual Shirt '], 'features': {}, 'brand': ['\n Gini & Jony ']}}
如何将图像键转换为数组?在
现在图像就像
^{pr2}$但我希望图像是一个数组
{'images': ['http://static13.jassets.com/p/Gini-26-Jony-Green-Casual-Shirt-9007-7386721-4-zoom.jpg','','','','']}
尝试使用列表理解:
简单地说:
示例:http://www.codeskulptor.org/#user39_Axyo9e7dCYT1Q7o.py
相关问题 更多 >
编程相关推荐