title: How to strip the white space or left justify the string scraped through BeautifulSoup? str.strip() or str.ljust() doesn't work
body: <p>How to strip or left justify the white space from the data scraped using BeautifulSoup?
  The data is converted to str from unicode.</p>
  
  <p>tried str.strip() and str.ljust(), str.replace("\n","").checking each character against None and displaying if not None is also does not work</p>
  
  <pre><code>  from bs4 import BeautifulSoup
    import requests    
    with open('f.html') as f:
      soup=BeautifulSoup(f,'lxml')
      article = soup.findAll('div',class_='modal-content')
      for i in article:
          print (str(i.text).strip())
  </code></pre>
  
  <p>Output got:</p>
  
  <pre><code>reset to default listTour
  
                              Start here for a quick overview of the site
  
  
  
  
  
                      Help Center
  
                          Detailed answers to any questions you might have
  </code></pre>
  
  <p>expected output:</p>
  
  <pre><code> reset to default listTour
   Start here for a quick overview of the site
   Help Center
   Detailed answers to any questions you might have
  </code></pre>