Answers for "choose what to store in json file python"

0

python store json

import json

data = {}
data['people'] = []
data['people'].append({
    'name': 'Scott',
    'website': 'stackabuse.com',
    'from': 'Nebraska'
})
data['people'].append({
    'name': 'Larry',
    'website': 'google.com',
    'from': 'Michigan'
})

with open('data.txt', 'w') as outfile:
    json.dump(data, outfile)
Posted by: Guest on April-01-2021

Code answers related to "choose what to store in json file python"

Python Answers by Framework

Browse Popular Code Answers by Language