写入文件:

with open('CustomerRanking.json', 'w', encoding='utf-8') as ff:
        ff.write(str(data_dict))

读取文件:

with open('CustomerRanking.json', 'r', encoding='utf-8') as f:
            t = f.read()

Logo

聚焦前沿AI与大模型技术探索,汇聚开发者及爱好者,共享开源项目、学习资源与行业资讯。

更多推荐