title: Removing a dictionary from a list of dictionaries in python
body: <p>So I have a list of dictionaries, where each dictionary has two key-value pairs. Something like</p>
  
  <pre><code>l1 = [{'key1':'value1','key2':'value2'},
        {'key1':'value1','key2':'value2'},
        ...
       ]
  </code></pre>
  
  <p>Now what I want is to remove a dictionary from this list just be checking first <code>key</code> and its <code>value</code>. I can check whether a whole dictionary is present in the list and then remove it. But I just want to check whether a dictionary with a particular <code>first key</code> is present or not in the list. Such a dictionary will be unique. And I want to remove that dictionary from this list subsequently. How do I do that?</p>
  
  <p>Edit: While removing, I have only one key-value pair. So I want to remove the dictionary using one pair only. If I had both the pairs then I could have done</p>
  
  <pre><code>l1.remove({'key1':'value1', 'key2':'value2'})
  </code></pre>
  
  <p>But this is not the case as I do not have another pair. That's why I said that dictionary is unique.</p>