title: Python array segmented in ranges
body: <p>I have the following array <code>[1, 4, 7, 9, 2, 10, 5, 8]</code> and I need to separate the array in 3 different arrays: one for values between 0 and 3, anther for 3 to 6 and anther for 6 and 25.The result must be something like that:</p>
  
  <pre><code>array1 = [1, 2]
  array2 = [4, 5]
  array3 = [7, 9, 10, 8]
  </code></pre>
  
  <p>Any idea about how to do it simple?</p>