file_log.txt文件内容如下:
with open(‘file_log.txt‘, ‘r‘, encoding=‘utf-8‘) as f: for i in f: s = i.split() #print(s) data = s[0] with open(data+‘.log‘, ‘a‘, encoding=‘utf-8‘) as ff: ff.write(i) ff.flush()
原文地址:https://www.cnblogs.com/xiao-xue-di/p/9343722.html
时间: 2024-10-12 18:16:37