title: How to get a value from a list of dictionary Python?
body: <p>I have a list(stop_list) of dictionary. the structure of dictionary is </p>
  
  <pre><code>stop_id : ""
  stop_name : ""
  </code></pre>
  
  <p>Now, I have a name string which is to be matched against <code>stop_name</code>, and get the <code>stop_id</code> corresponding to that.</p>
  
  <p>Is there any efficient way of doing it? I could come up with only for loop.</p>
  
  <pre><code>for entry in stop_list:
              if name = entry['name']:
                  id = entry['id']
                  break
  </code></pre>