Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个在这里链接的yelp响应。我正在尝试仅打印返回的名称列表。我尝试了以下方法:
print response['name'] print response[0] print response[0]['name']
而且似乎都给出了错误。如何访问仅包含地名的列表?还是只有一个地名?
for b in response['businesses']: print b.get('name', 'missing')