title: Flattening nested list
body: <p>I have hundreds of rows of data that look like this:</p>
  
  <pre><code>[[u' 16 '], [u'1x23'], [u'Mr Test', u' (5)'], [u'John Smith'], [u'54.5'], [], [u'10%'], [u'40%'], [u'$26,503']]
  </code></pre>
  
  <p>Some of the values are nested and some also are empty.</p>
  
  <p>I'm trying to massage it to be like this:</p>
  
  <pre><code>['16', '1x23', 'Mr Test', '(5)', 'John Smith', '54.5', '', '10%', '40%', '$26,503']
  </code></pre>
  
  <p>I've tried some ideas found on here like flattening, including the following routine:</p>
  
  <pre><code>def traverse(o, tree_types=(list, tuple)):
      if isinstance(o, tree_types):
          for value in o:
              for subvalue in traverse(value):
                  yield subvalue
      else:
          yield o
  </code></pre>
  
  <p>This worked for some tables I've already parsed but only when there are no empty values.  </p>