title: Get the index of the exact match from a list
body: <pre><code>lst = ['a', 'b', 'c', 'aa', 'bb', 'cc']
  
  def findexact(lst):
      i=0
      key = ['a','g','t']
      while i &lt; len(lst):
          if any(item in lst[i] for item in key):
              print i
  
          i+=1
  
  findexact(lst)
  </code></pre>
  
  <p>in the above code, the result comes out to be:</p>
  
  <pre><code>0
  3
  </code></pre>
  
  <p>I would like the result to be:</p>
  
  <pre><code>0
  </code></pre>
  
  <p>I would like to get the index of the "exact" match. What do I need to do to get the acceptable result?</p>