title: For a list of numbers and a list of intervals, find the interval in which each number is located
body: <p>In a dictionary as follow:</p>
  
  <pre><code>example = {'Chr3' : [[1, 4], [5, 10], [13, 17]]}
  </code></pre>
  
  <p>How can I know in which list interval numbers 6 and 15 are located?</p>
  
  <p>I can write a solution with a simple <code>for</code> loop:</p>
  
  <pre><code>for key in example.keys():
      for element in example[key]:
          if element[0]&lt;= 6 &lt;= element[1] or element[0] &lt;= 15 &lt;= element[1]:
              print element
  </code></pre>
  
  <p>But in my real problem, I don't have only two numbers but a list of numbers.</p>
  
  <p>So, I was thinking if there is a more pythonic way of solving such a problem using special list or dictionary methods/functions?</p>
  
  <p>EDIT:
  Because of down votes, I clarify that I know how to write the code using another loop on top for a list of numbers, I was wondering if there is a better solution to the same problem, a more efficient one!</p>