title: finding a specific value from list of dictionary in python
body: <p>I have the following data in my list of dictionary:</p>
  
  <pre><code>data = [{'I-versicolor': 0, 'Sepal_Length': '7.9', 'I-setosa': 0, 'I-virginica': 1},
  {'I-versicolor': 0, 'I-setosa': 1, 'I-virginica': 0, 'Sepal_Width': '4.2'},
  {'I-versicolor': 2, 'Petal_Length': '3.5', 'I-setosa': 0, 'I-virginica': 0},
  {'I-versicolor': 1.2, 'Petal_Width': '1.2', 'I-setosa': 0, 'I-virginica': 0}]
  </code></pre>
  
  <p>And to get a list based upon a key and value I am using the following:</p>
  
  <pre><code>next((item for item in data if item["Sepal_Length"] == "7.9"))
  </code></pre>
  
  <p>However, all the dictionary doesn't contain the key <code>Sepal_Length</code>, I am getting :</p>
  
  <pre><code>KeyError: 'Sepal_Length'
  </code></pre>
  
  <p>How can i solve this?</p>