title: Check if value already exists within list of dictionaries?
body: <p>I've got a Python list of dictionaries, as follows:</p>
  
  <pre><code>a = [
      {'main_color': 'red', 'second_color':'blue'},
      {'main_color': 'yellow', 'second_color':'green'},
      {'main_color': 'yellow', 'second_color':'blue'},
  ]
  </code></pre>
  
  <p>I'd like to check whether a dictionary with a particular key/value already exists in the list, as follows:</p>
  
  <pre><code>// is a dict with 'main_color'='red' in the list already?
  // if not: add item
  </code></pre>