title: Python: Get index of dictionary item in list
body: <p>I have a list li:</p>
  
  <pre><code>[
  {name: "Tom", age: 10},
  {name: "Mark", age: 5},
  {name: "Pam", age: 7}
  ]
  </code></pre>
  
  <p>I want to get the index of the item that has a certain name. For example, if I ask for "Tom" it should give me: 0. "Pam" should give me 2.</p>