python syntax error with list filtering
<p>I'm trying to filter an item from a list, and I'm getting a syntax error:
<strong>SyntaxError: invalid syntax</strong></p>

<p>The code:</p>

<pre><code>a['name'] = 'Dan'
b['name'] = 'Joe'

ppl = [a,b]
inputName = raw_input('Enter name:').strip()
person = [p in ppl if p['name']==inputName].pop()
</code></pre>

<p>any idea?</p>
