📜  将 json 写入文件 python 代码示例

📅  最后修改于: 2022-03-11 14:47:24.845000             🧑  作者: Mango

代码示例6
# to write on file
# data_dict is a dictionary

import json
        
with open('data.json', 'w') as f:
    json.dump(data_dict, f)