title: Syntax to modify the keys inside a dictionary for-comprehension
body: <p>I am running into difficulties trying to create a modified key when manipulating a <code>dictionary</code>. Here the key needs to be changed from the original <code>dict</code> key to <code>'x'</code> plus the dict key. How can that be done?  My attempt is shown:</p>
  
  <pre><code>inventory = {k:updateMap(m,
                           {'partNumber': m['part'], 
                            'partName': m['desc'],
                            'bbox': {
                              'xmin' : bboxes[k].x,
                              'xmax' : bboxes[k].x + bboxes[k].w,
                              'ymin' : bboxes[k].y,
                              'ymax' : bboxes[k].y + bboxes[k].h
                            }
                            }) for k,m in 
                                  ['x%d' %k1,m1 
                                   for k1,m1 in inventoryRaw.items()]}
  </code></pre>
  
  <p>Here is the syntax error <code>Unresolved reference m1</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/ldFxB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ldFxB.png" alt="enter image description here"></a></p>
  
  <p>How should the nested comprehension be modified?</p>