写:
with open(os.path.join(out_dir,'val.json'),"w") as v:
json.dump(val_dict, v)
读:
Train_file = '/root/zhn/video_highlights/dataset/regression/train.json'
Train_file = open(Train_file,'r')
Train=json.load(Train_file)
写:
with open(os.path.join(out_dir,'val.json'),"w") as v:
json.dump(val_dict, v)
读:
Train_file = '/root/zhn/video_highlights/dataset/regression/train.json'
Train_file = open(Train_file,'r')
Train=json.load(Train_file)
本文标题:python使用json读写
本文链接:https://www.haomeiwen.com/subject/yndcuftx.html
网友评论