import os filename='./train_data/img_' for i in range(1,19736): newfile=filename+str(i)+'.txt' if os.path.exists(newfile): read= open(newfile, 'r') for line in read: writ = open('recode.txt', 'a') writ.write(line) writ.write('\n') else: con
filename='./train_data/img_'
for i in range(1,19736):
newfile=filename+str(i)+'.txt'
if os.path.exists(newfile):
read= open(newfile, 'r')
for line in read:
writ = open('recode.txt', 'a')
writ.write(line)
writ.write('\n')
else:
continue