[python dict] python 保存字典为json文件
python 保存字典为json文件# 方法1json_str = json.dumps(all_house,ensure_ascii=False)json_str = json.dumps(test_dict)# 方法2with open('test_data.json', 'w') as json_file: json_file.write(json_str)
原创
2021-09-09 08:16:21 ·
892 阅读 ·
0 评论