How to merge multiple txt files in a folder in Python?
漂亮男人2017-05-18 10:54:10
0
1
938
Read a txt file in the folder Record the txt file name (user ID) Write to a new txt file Delete the original txt file Loop of the above steps txt files are sorted by time in the content Add user ID at the beginning of each log Original content
python2.7语法, py3请自行相应改下