Q:

How do I delete the title from a text file in Python?

I have around 2,000 text files containing summaries of news articles and I want to remove the title from all the files that have titles (some don't have titles for some reason) using Python.
Here's an example:
Ad sales boost Time Warner profit 

Quarterly profits at US media giant TimeWarner jumped 76% to $1.13bn (£600m) for the three months to December, from $639m year-earlier.Its profits were buoyed by one-off gains which offset a profit dip at Warner Bros, and less users for AOL.It lost 464,000 subscribers in the fourth quarter profits were lower than in the preceding three quarters.However, the company said AOL's underlying profit before exceptional items rose 8% on the back of stronger internet advertising revenues.Time Warner's fourth quarter profits were slightly better than analysts' expectations.For the full-year, TimeWarner posted a profit of $3.36bn, up 27% from its 2003 performance, while revenues grew 6.4% to $42.09bn.For 2005, TimeWarner is projecting operating earnings growth of around 5%, and also expects higher revenue and wider profit margins.

My question is how to remove the line, "Ad sales boost Time Warner profit" ? 
Edit: I basically want to remove everything before a line break.
TIA.

A:

If it's (as you say) just a simple matter of removing the first line, when followed by \n\n, you could use a simple regex like this:
import re

with open('testing.txt', 'r') as fin:
    doc = fin.read()

doc = re.sub(r'^.+?\n\n', '', doc)

