title: Split dictionary into 2 dictionaries by specifying which key-value pair is to be inserted in new dictionary
body: <p>Suppose there is a  dictionary as follows:</p>
  
  <pre><code>d={'name': 'xyz', 'age':21, 'contact':2398402093, 'address': 'new_street', 'score':87} 
  </code></pre>
  
  <p>I need to divide them into 2 dictionaries where the second one contains name and contact and the first one contains the rest.</p>
  
  <p>This is what I need:</p>
  
  <pre><code>d={'age:21, 'address': 'new_street', 'score':87}
  d1={'name':'xyz','contact':2398402093}
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I tried splitting them based on length though I specifically want to split it based on the keys but even with length I get this error:</p>
  
  <pre><code>d={'name': 'xyz', 'age':21, 'contact':2398402093, 'address': 'new_street', 'score':87} 
  d1 = dict(d.items()[len(d)/2:])
  d2 = dict(d.items()[:len(d)/2])
  print(d1)
  print(d2)
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-3-66f097c85c58&gt; in &lt;module&gt;
        1 d={'name': 'xyz', 'age':21, 'contact':2398402093, 'address': 'new_street', 'score':87}
  ----&gt; 2 d1 = dict(d.items()[len(d)/2:])
        3 d2 = dict(d.items()[:len(d)/2])
        4 print(d1)
        5 print(d2)
  
  TypeError: 'dict_items' object is not subscriptable
  
  </code></pre>
  
  <p>How do I split it based on the keys I want to put in the different dictionaries?</p>