title: mongo query in python
body: <p>I have a command line argument user_id as --uid.</p>
  
  <p>I want to access the record of that particular user_id from another collection "student_details" in python.</p>
  
  <p>As I am new to mongoDB, I would like to get the answer for my particular query</p>
  
  <pre><code>users={
  _id :Object(###),
  name:"",
  standard:""
  ..
  ..
  ..
  }
  
  
  student_details={
  _id:Object(###),
  user_id:"", -----&gt; referenced
  ..
  }
  </code></pre>
  
  <p>I tried doing this,</p>
  
  <pre><code>collection = db['student_details']
  query = "%s" % option.uidfile
  results = collection.find({"user_id":query})
  
  print results
  </code></pre>
  
  <p>ouput:</p>
  
  <pre><code>&lt;pymongo.cursor.Cursor object at 0x95c910c&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>