title: Appending Key/Value Pairs to Python Dictionary in For Loop, Output Ordering
body: <p>I am attempting to add the username field to each of the 3 dictionaries within the output list, then I want to add each field to it's respective dictionary as a key/value pair as field#/field value for easily putting the items in a DynamoDB. However, when I output the result of the dictionaries in output list I am receiving out of order fields(keep in mind there are thousands of fields for each object).</p>
  
  <pre><code>   #Result stores a list of dicts with username key/value pair and a long list of fields
      result = [{ username: nasa , fields: [Nebula, Moon, Star, ...]},{ username: nationalgeographic, fields: [Grass, Tree, ...] },{ username: kingjames, fields[Basketball, Hardwood, Jersey, ...]}]
  
      for i in result:
          #For each dict in list
          num = 1
          item = {}
          item['username'] = i['username']
          for tag in i['fields']:
              label_string = 'label' + str(num)
              item[label_string] = tag
              num += 1
          output.append(item.copy())
          #Output should store 3 dicts with username, and labels with tags
      for user in output:
          for key, value in user.items():
              print(key, value)
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>username nasa
  field1 Nebula
  field2 Moon
  field3 Star
  .
  .
  .
  username nationalgeographic
  field1 Grass
  field2 Tree
  .
  .
  .
  username kingjames
  field1 Basketball
  field2 Hardwood
  field3 Jersey
  .
  .
  .
  </code></pre>
  
  <p>Actual Output</p>
  
  <pre><code>username nasa
  field333 Black Hole
  field282 Asteroid
  field122 Mars
  .
  .
  .
  username nationalgeographic
  field122 Moss
  field3323 Bark
  field212 Wood
  .
  .
  .
  username kingjames
  field233 Shoe
  field9331 Headband
  field211 Mesh
  </code></pre>