def save_txt(str_list:list,name):
with open(name,'w',encoding='utf-8') as f:
for i in str_list:
f.write(i+'\n')
读取行
with open('weeks','r',encoding='utf-8') as f:
fe=f.readlines()
读取全部
with open('weeks','r',encoding='utf-8') as f:
fe=f.read()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)