python合并多个txt文件
如题:将文件夹c_b下的多个txt文件合并为1个:代码如下:import osfilepath=r'c:\Users\64884\Desktop\combine\c_b'filenames=[file for file in os.walk(filepath)]ds=[]lis=[]for each in filenames[0][-1]: with open(filenames[0][0]+'\\'+each,mode='r',encoding='utf-8') as.