title: take the first x elements of a dictionary on python
body: <p>I am a newbie on python, so I try to take the first 50 elements of a dictionary in python.
  I have a dictionary which is decreasing order sorted by value.</p>
  
  <pre><code>k=0
  l=0
  for k in len(dict_d):
      l+=1
      if l&lt;51:
          print dict
  </code></pre>
  
  <p>for a small example:</p>
  
  <pre><code> dict_d={'m':'3','k':'4','g':'7','d':'9'}
  </code></pre>
  
  <p>take the first 3 elements in a new dictionary:</p>
  
  <pre><code> new_dict={'m':'3','k':'4','g':'7'}
  </code></pre>
  
  <p>I could not find how to do that?</p>