title: Deleting document in PyMongo from id
body: <p>I seem to be struggling to find the right way of deleting a document. I.e. should I be using remove() or delete_one() for example and also what is the canonical method of deleting by id, which is a <code>string</code>.</p>
  
  <p>I.e. should I be using the following:</p>
  
  <pre><code>mongo.db.xxx.delete_one({'_id': { "$oid" : str(_id) } })
  </code></pre>
  
  <p>or can I use another format?</p>
  
  <pre><code>mongo.db.xxx.remove({'_id': { "$oid" : str(_id) } })
  mongo.db.xxx.remove({'_id': ObjectId(_id) })
  </code></pre>
  
  <p>What is the canonical form?</p>