How to remove duplicate dictionary based on selected keys from a list of dictionaries in Python?
<p>I am new to Python and trying to learn it as much as possible. I am stuck with a silly problem where I want to remove certain dictionary items of a list based on selective key-value pairs. For ex, I have:</p>

<pre><code>l = [{'A':1, 'B':2, 'C':3, 'D':4},
     {'A':5, 'B':6, 'C':7, 'D':8},
     {'A':1, 'B':9, 'C':3, 'D':10}]
</code></pre>

<p>And the output I want is removal of dictionaries based on two keys <code>A</code> and <code>C</code> values:</p>

<pre><code>l = [{'A':1, 'B':2, 'C':3, 'D':4},
     {'A':5, 'B':6, 'C':7, 'D':8}]
</code></pre>