title: Get specific range of results from mongoDB with python
body: <p>I'm using mongoDB with python to create a experiment blog website. For example I have 100 blog posts and I want to divide into 5 parts. How do I write the query to retrieve the first 20 blog posts, and then the second 20 blog posts (from post 21 to 40...)
  The obvious way is to retrieve all the posts into memory and use for example:</p>
  
  <pre><code>firstposts = posts[0, 20]
  </code></pre>
  
  <p>But I wonder if I can retrieve directly 20 first posts instead of</p>
  
  <pre><code>db.posts.find()
  </code></pre>
  
  <p>Thanks,</p>