title: How to remove multiple empty lines when scraping with Beautifulsoup
body: <p>my code outputs multiple empty line breaks. 
  How do i remove all the empty space?</p>
  
  <pre><code>from bs4 import BeautifulSoup
  import urllib.request
  import re
  url = input('enter url moish')
  page = urllib.request.urlopen(url)
  soup = BeautifulSoup(page,'lxml')
  all = soup.find_all('a', {'class' : re.compile('itemIncludes')})
  for i in all:
            print(i.text)
  </code></pre>
  
  <p>code output:</p>
  
  <pre><code>Canon EOS 77D DSLR Camera (Body Only)
  
  
  
  LP-E17 Lithium-Ion Battery Pack
  
  
  
  LC-E17 Charger for LP-E17 Battery Pack
  </code></pre>
  
  <p>desired output:</p>
  
  <pre><code>Canon EOS 77D DSLR Camera (Body Only)
  LP-E17 Lithium-Ion Battery Pack
  LC-E17 Charger for LP-E17 Battery Pack
  </code></pre>
  
  <p>Thanks!</p>