title: finding index in a nested list
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7852043/efficient-word-indexing-in-python">efficient word indexing in python</a>  </p>
  </blockquote>
  
  
  
  <p>Apologies for the basic question, how can I find the indexes <code>((1,2),(2,1),(2,2))</code> corresponding to "yellow" in <code>ref</code> and store them so that I can access them afterwords without rerunning the search?</p>
  
  <pre><code>ref1 = "this is a test" 
  ref2 = "this is a yellow test"
  ref3 = "this is yellow"
  ref4 = "yellow and orange are colors"
  ref = ((ref1,ref2),(ref3,ref4))
  </code></pre>