title: storing values from loop
body: <p>For example I have this code:</p>
  
  <pre><code>for r in res:
      for x,y in r:
          print(x,y)
  </code></pre>
  
  <p>And the output is this:</p>
  
  <pre><code>[0 0 0 1 0 0 0 0 0 1 1 0 1] (0.3779644730092272, 1)
  [1 1 0 0 1 1 0 0 0 0 0 0 0] (0.4472135954999579, 0)
  [0 0 1 1 0 0 0 1 0 0 0 0 1] (0.4472135954999579, 1)
  </code></pre>
  
  <p>But how do I store the first column which is the 0's and 1's in a single variable like this:</p>
  
  <pre><code>[[0 0 0 1 0 0 0 0 0 1 1 0 1]
  [1 1 0 0 1 1 0 0 0 0 0 0 0]
  [0 0 1 1 0 0 0 1 0 0 0 0 1]]
  </code></pre>
  
  <p>I also tried this:</p>
  
  <pre><code>for r in res:
      for x,y in r:
          first = x
  </code></pre>
  
  <p>But this only stores the last value. Is there a neat way or a one liner in python that can do this?</p>