title: python: how to get a subset of dict
body: <p>I have a dict that has many elements, I want to write a function that can return the elements in the given index range(treat dict as array):</p>
  
  <pre><code>get_range(dict, begin, end):
      return {a new dict for all the indexes between begin and end}
  </code></pre>
  
  <p>How that can be done?</p>
  
  <p>EDIT: I am not asking using key filter... eg)</p>
  
  <pre><code>{"a":"b", "c":"d", "e":"f"}
  
  get_range(dict, 0, 1) returns {"a":"b", "c":"d"} (the first 2 elements)
  </code></pre>
  
  <p>I don't care the sorting...
  Actually I am implementing the server side paging...</p>