How to print html output each on its line in python?
<p>so i'm making alittle project as i am a beginner and i'm doing some webscraping. I wanted to print the lyrics of a song each on it's line using beautifulsoup in python but instead it's printing like this:</p>

<p>I looked out this morning and the sun was goneTurned on some music to start my dayI lost myself in a familiar songI closed my eyes and I slipped awayIt's more than a feeling (more than a feeling)When I hear that old song they used to play (more than a feeling)And I begin dreaming (more than a feeling)Till I see Marianne walk awayI see my Marianne walkin' awaySo many people have come and goneTheir faces fade as the years go byYet I still recall as I wander onAs clear as the sun in the summer skyIt's more than a feeling (more than a feeling)When I hear that old song they used to play (more than a feeling)And I begin dreaming (more than a feeling)Till I see Marianne walk awayI see my Marianne walkin' awayWhen I'm tired and thinking coldI hide in my music, forget the dayAnd dream of a girl I used to knowI closed my eyes and she slipped awayShe slipped awayIt's more than a feeling (more than a feeling)When I hear that old song they used to play (more than a feeling)And I begin dreaming (more than a feeling)Till I see Marianne walk away</p>

<p>This is my code:</p>

<pre><code>import urllib
from bs4 import BeautifulSoup

html = urllib.urlopen("http://www.metrolyrics.com/more-than-a-feeling-lyrics-boston.html")

bsObj = BeautifulSoup(html, "lxml")

namelist = bsObj.find_all("div", {"id": "lyrics-body-text"})

print("".join([p.get_text(strip=True) for p in namelist]))
</code></pre>

<p>You need to remove the <code>strip = True</code> parameter to <code>get_text</code>. That strips the string resulting in the joined output you see. </p>

<p>By removing it:</p>

<pre><code>print("".join([p.get_text() for p in namelist]))  
</code></pre>

<p>It prints fine.</p>

python html python-3.x web-scraping beautifulsoup