import json with open("knowledge.json", 'r') as f: data = json.load(f) data["worksbuddy.com"]["google.com"]["input"].append([3,4]) data["worksbuddy.com"]["google.com"]["output"].append(6) with open('knowledge.json', 'w') as f: f.write(json.dumps(data)) print(data)
Thursday, October 6
Append and Update json object python
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment