Answers for "python read a json file and print a value"

12

open json file python

import json

with open('data.txt') as json_file:
    data = json.load(json_file)
Posted by: Guest on March-02-2020
5

write json pythonb

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('')
Posted by: Guest on November-29-2019

Code answers related to "python read a json file and print a value"

Python Answers by Framework

Browse Popular Code Answers by Language