title: Map list to list of lists by index (Python)
body: <p>I'm looking for an efficient way to map a list of values, say </p>
  
  <pre><code>x = [1,2,3,4,5,6,7,8,9] 
  </code></pre>
  
  <p>to another list, containing lists of values of the same total range, for example </p>
  
  <pre><code>z = [[1,2,3], [4,5,6], [7,8,9]]. 
  </code></pre>
  
  <p>What I need to know is basically the index a value from x corresponds to in z. <code>x[0]=1</code> would correspond to <code>z[0]</code>, because it falls in the first bin of z, where <code>x[7]=8</code> would correspond to <code>z[2]</code>, because it falls in the third bin. </p>
  
  <p>How do I identify that index of the sublists of z for each x value? In my case, x has about 50,000 values, z has about 5,000 sublists, and I have lots of those lists, so I'm looking for a way to do that as fast as possible. </p>