📜  python json 打开文件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:23.100000             🧑  作者: Mango

代码示例6
import json

with open('data.txt') as json_file:
    data = json.load(json_file)
    for p in data['people']:
        print('Name: ' + p['name'])
        print('Website: ' + p['website'])
        print('From: ' + p['from'])
        print('')