I have the following while loop:
while workplace_tag.find_all_next('p')[l] != 'h1':
abstract_tag = workplace_tag.find_all_next('p')[l]
abstract = abstract_tag.text.strip().replace('\n', ' ').encode('windows-1252', errors='replace')
l += 1
print(abstract)
How do I join the <p>
tags that are printed all into one line.
For example at the moment there might be something like this:
<p>1</p>
<p>2</p>
<p>3</p>
<p>4</p>
And I need it like this:
<p>1</p><p>2</p><p>3</p><p>4</p>
Thanks