title: How do I figure out the value which is greater than certain threshold in a matrix?
body: <p>Assume that I have a matrix:</p>
  
  <pre><code>a = [[4,7,2],[0,1,4],[4,5,6]] 
  </code></pre>
  
  <p>And I want to get</p>
  
  <pre><code>b = [0, 1]
  c = [[2],[0,1]]
  </code></pre>
  
  <ul>
  <li><code>b = [0,1]</code> because the inner lists of <code>a</code> at position <code>0</code> and <code>1</code> contain values that are smaller then <code>3</code>. </li>
  <li><code>c = [[2],[0,1]]</code> because the <code>[2]</code> nd element of the first sublist in <code>b</code> is below 3 and <code>[0,1]</code> because the first and second element in the second sublist in <code>b</code> is below 3. </li>
  </ul>
  
  <p>I tried :</p>
  
  <pre><code>for i in a:
     for o in i:
        if o &lt; 3:
           print(i)
  </code></pre>
  
  <p>It only returns the original matrix.</p>
  
  <p>How do I get <code>b</code>&amp;<code>c</code> in python?</p>