title: Removing the remainder of a line after occurrence of a character
body: <p>I have a text file with several thousand lines. What I would like to do is remove the first occurence of '|' in a line and all in that line that follows. I'm rather new to python and am not sure how one would go about this. re.search comes to mind but I am not sure how to only remove a portion of a line.</p>