title: How to split the file content by space and end-of-line character?
body: <p>When I do the following list comprehension I end up with nested lists:</p>
  
  <pre><code>channel_values = [x for x in [ y.split(' ') for y in
      open(channel_output_file).readlines() ] if x and not x == '\n']
  </code></pre>
  
  <p>Basically I have a file composed of this:</p>
  
  <pre><code>7656 7653 7649 7646 7643 7640 7637 7634 7631 7627 7624 7621 7618 7615
  8626 8623 8620 8617 8614 8610 8607 8604 8600 8597 8594 8597 8594 4444
  &lt;snip several thousand lines&gt;
  </code></pre>
  
  <p>Where each line of this file is terminated by a new line.</p>
  
  <p>Basically I need to add each number (they are all separated by a single space) into a list.</p>
  
  <p>Is there a better way to do this via list comprehension?</p>