import json
with open(path) as f
data = json.load(f)
data["new"] = "penguin"
json.dump(data,f)
import json
def write_json(filename, json_data):
with open(filename) as f:
obj = json.load(f)
obj.append(json_data)
with open(filename,"w+") as of:
json.dump(obj, of)