I am trying to use Python to auto-parse a set of text files and turn them into XML files.
There are alot of people asking how to loop through a text file and read them into an array. The trouble here is that this wont quite work for me.
I need to loop through the first three lines individually then drop the rest of the text file (body) into one array entry.
The text file is formatted as follows.
Headline
Subhead
by A Person
text file body content. Multiple paragraphs
How would I go about setting up an array to do this in Python?