Search in python list of dict
<p>I have a list (l) of dictionaries <code>{"id": id, "class": class, "parameter": parameter}</code>. I have to do this,</p>

<pre><code>for each value of class:
    parameter = getParameter(class) //we can get different parameter for same class
    if {"class":class, "parameter":parameter} not in l:
         increment id and do l.append({"id": id, "class": class, "parameter": parameter})
</code></pre>

<p>Here dict in list has 3 keys, where as i have to search in list with 2 keys. How can i validate 'if' condition?  </p>
