title: Logical operators in mongodb queries with python
body: <p>I am trying to query my mongo db for a item in python2.7 with</p>
  
  <pre><code>output = collection.find_one({ $and : [{'name' : data['name']},{'phone_1' : data['phone_1']}]})
  </code></pre>
  
  <p>when I try to run the script python tell me</p>
  
  <pre><code>File "./test.py", line 113
  output = collection.find_one({ $and : [{'name' : data['name']},{'phone_1' : data['phone_1']}]})
                                 ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>I checked the manual and the version of mongo. I have installed mongodb 2.0.6, so the syntax above should be fine. Am I missing something?</p>