Aug-14-2017, 08:19 AM
Where you have:
I have not created all the little files you have but try this:
if "<LINE>" in line: line = line.split("<LINE>") line = "".join(str(x) for x in line) _line = re.sub(r"</LINE>", " ", line) f.write(_line)You have not taken out the end of line characters.
I have not created all the little files you have but try this:
if "<LINE>" in line: line = line.split("<LINE>") line = "".join(str(x) for x in line) _line = re.sub(r"</LINE>", " ", line) outline = _line.rstrip('\r\n') _line = outline f.write(_line)I just created the one file with all of your text in it so it might need some adjustment.