存储json文件,逐条按行存储
with open('xxx.json', 'a+', encoding='utf8')as f:
json.dump(temp, f, ensure_ascii=False)
f.write('\n')
存储csv文件
with codecs.open(file_name, 'a+', encoding='utf8')as f: csv.writer(f).writerow((temp['0'], temp['1']...))