社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

Python:提取和压缩json数据

coding • 4 年前 • 1760 次点击  

我有一个json结构:

[
{
    "title": "5280 Cafe At Rallysport",
    "streetAddress": "2727 29th St.",
    "addressLocality": "Boulder",
    "addressRegion": "CO",
    "postalCode": "80301",
    "phoneNumber": "720-526-1013",
    "vendorCuisine": "Breakfast"
},
{
    "title": "Ali Baba Grill Boulder",
    "streetAddress": "3054 28th St",
    "addressLocality": "Boulder",
    "addressRegion": "CO",
    "postalCode": "80304",
    "phoneNumber": "303-440-1393",
    "vendorCuisine": "Mediterranean"
}]

我想提取标题、街道地址、地址地点和邮政编码,最后为每一个都提供这种格式。

final_address = 5280 Cafe At Rallysport, 2727 29th St., Boulder , 80301

我不知道该怎么做。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/130988
文章 [ 1 ]  |  最新文章 4 年前