Do you want to remove the linebreaks? What about?
text = apod_inf.replace('<p>', '').replace('</p>', '').replace('\n', '')
And if you don't want to be that cluttered you can try something like:
foo.replace('\n\n', 'SOMETOKEN').replace('\n', 'SOMETOKEN', 1).replace('\n', '', 1).replace('SOMETOKEN', '\n')