title: Find index of element in sub-sub-list
body: <p>I have a list that looks like this:</p>
  
  <pre><code>a = [[[0.0125, 6.6], [0.0125, 6.65], [0.0125, 6.7], [0.0125, 6.75], [0.0125, 6.8]], [[0.0185, 6.6], [0.0185, 6.65], [0.0185, 6.7], [0.0185, 6.75], [0.0185, 6.8]]]
  </code></pre>
  
  <p>ie: <code>N</code> sub-lists (only two here) and <code>M</code> sub-sub-lists in each sub-list (five in this example). Each element/sub-sub-list is made of two floats.</p>
  
  <p>I need to find the index of a given element, say <code>[0.0185, 6.75]</code>. In this case the result should be: <code>[1, 3]</code>.</p>
  
  <p>I can't just apply the <code>.index()</code> operator on <code>a</code> since the element is inside one of the sub-lists and since I don't know a priori which one it is I can't loop through the sub-lists applying that operator because it will result in an error if the element is not found.</p>
  
  <hr>
  
  <p><strong>Add</strong></p>
  
  <p>I tried the answers by zhangxaochen ans DSM in a much larger array (16 sub-lists and 70 sub-sub-lists) to see which one was faster and this is what I got:</p>
  
  <pre><code>DSM: 4.31537628174e-05
  zhangxaochen: 0.00113296508789
  </code></pre>
  
  <p>Since DSM's answer its ~26x faster, I'm selecting that one. Thanks guys!</p>