📅  最后修改于: 2022-03-11 15:03:16.403000             🧑  作者: Mango
a_dictionary = {"d": 4}
with open("sample_file.json", "r+") as file:
data = json.load(file)
update(a_dictionary)
seek(0)
dump(data, file)