title: Sorting two hashes into one in Python
body: <p>I have two hash <code>FP['NetC']</code> containing all cells connected to a specific net for example:</p>
  
  <pre><code>'net8': ['cell24', 'cell42'], 'net19': ['cell11', 'cell16', 'cell23', 'cell25', 'cell32', 'cell38']
  </code></pre>
  
  <p>and <code>FP['CellD_NM']</code> containing the x1,x0 coordinate for each cell for example:</p>
  
  <pre><code>{'cell4': {'Y1': 2.164, 'Y0': 1.492, 'X0': 2.296, 'X1': 2.576}, 'cell9': {'Y1': 1.895, 'Y0': 1.223, 'X0': 9.419, 'X1': 9.99}
  </code></pre>
  
  <p>I need to create a new hash (or list) that will give x0 and x1 for each cell in a spesific net. for instance:</p>
  
  <p>net8: 
       cell24 {xo,x1}
       cell42 {xo,x1}
  net 18:
       cell11 {xo,x1}
           ...</p>
  
  <p>Here is my code </p>
  
  <pre><code>L1={}
  L0={}
  for net in FP['NetC']:
  
      for cell in FP['NetC'][net]:
              x1=FP['CellD_NM'][cell]['X1']
              x0=FP['CellD_NM'][cell]['X0']
  
              L1[net]=x1
              L0[net]=x0
  print L1
  print L0
  </code></pre>
  
  <p>All I got was the last value for each net.</p>
  
  <p>Do you have any ideas?</p>