title: Find an item in a list using the known index
body: <p>I'm having trouble with Python here and need your help.</p>
  
  <p>I want to return an item found at a particular index. I can't know what the item is yet, only the index.  Everything I have found is the opposite of what I need, i.e., find the index of a known item using <code>myList.index(item)</code>.</p>
  
  <p>Snippet:</p>
  
  <pre><code>new_lst = x
  new_lst.sort()
  leng = len(new_lst).....
  
      elif leng &gt; 1 and leng % 2 == 0:
      a = (leng / 2) #or float 2.0
      b = a - 1 
      c = new_lst.index(a) #The problem area
      d = new_lst.index(b) #The problem area
      med = (c + d) / 2.0
      return med ......
  </code></pre>
  
  <p>The above will only return if <code>a</code> is in <code>new_lst</code>.  Else it errors out.  I want to get the middle two numbers (if list is even), add them together and then average them.</p>
  
  <p>Example: <code>new_lst = [4,3,8,8]</code>. Get em, sort em, then should take the middle two numbers (<code>a</code> &amp; <code>b</code> above, indices 1 &amp; 2), add them and average: <code>(4 + 8) / 2</code> equaling 6.  My code would assign 2 to <code>a</code>, look for it in the list and return an error: 2 not in <code>new_lst</code>.  Not what I want.</p>