title: More elegant way to create a list of lines from BeautifulSoup.findAll
body: <p>I am writing a web parser using BeautifulSoup. I create a list of lines generated with <code>bs.findAll(text=True)</code>, and then split line for line and apply my logic there. <code>html_payload</code> is an arbitrary webpage.</p>
  
  <p>The code I've got so far works, but it's not very pretty, and makes me think there must be a better, more elagant way of writing it.</p>
  
  <pre class="lang-py prettyprint-override"><code>    data_to_parse = BeautifulSoup(html_payload)
      lines_to_parse = []
  
      d = data_to_parse.findAll(text=True)
      for line in d:
          for line2 in line.strip().split('\n'):
              if line2:
                  lines_to_parse.append(line2)
  
      for line in lines_to_parse:
          pass # here's where I start analyzing results
  </code></pre>
  
  <p>Is there anyone who can suggest a better way of solving this?</p>