dd = {}
# 添加字典内容
with open("a.json", "w") as f:
f.write(json.dumps(dd, ensure_ascii=False, indent=4, separators=(',', ':')))
[PYTHON]字典生成可阅读的json文件
最新推荐文章于 2023-04-19 19:39:41 发布
dd = {}
# 添加字典内容
with open("a.json", "w") as f:
f.write(json.dumps(dd, ensure_ascii=False, indent=4, separators=(',', ':')))