python脚本常用操作

读取json格式文件

import json
with open('1.txt', 'r', encoding='utf-8') as f1:
    lines1 = f1.readlines()
    for x1 in lines1:
        data1 = json.loads(x1)
posted @ 2024-04-03 21:24  没脚的丛林鸟  阅读(1)  评论(0编辑  收藏  举报