title: Python Append List Repeats Last Element?
body: <p>I'm having difficulty figuring out why I get n-th many last elements in my "rows" list repeated in my item_list list? So if my rows is a list of tuples:</p>
  
  <pre><code>(("ID 1", "info1", "description1"), ("ID 2", "info2", "description2"), ... ("ID 14", "info14", "description14"))
  </code></pre>
  
  <p>And then I were to try to make a list dictionary out of this "rows" list of tuples to using the following code:</p>
  
  <pre><code>item_list = []
  info = {}
  
  for row in rows:            
      itemId = row[0]
      itemInfo = row[1]
      itemDesc = row[2]
  
      info['ID'] = itemId
      info['Info'] = itemId
      info['Description'] = itemDesc
  
      print info
  
      item_list.append(info)
  
  print item_list
  </code></pre>
  
  <p>So if my "rows" list has 14 elements, I'll get the 14th element (last element) in "rows" 14 times in my "item_list" list of dictionaries. </p>
  
  <pre><code>item_list = [{"ID": "ID 14", "Info": "info14", "Description": "description14"}, {"ID": "ID 14", "Info": "info14", "Description": "description14"} ... ] #14 times
  </code></pre>
  
  <p>The "rows" list is a list of tuples. If I print the "info" dictionary just before appending to the "item_list" I can see each different iteration of my "info" dictionary. </p>
  
  <p>Anyone have any ideas? Thanks in advance.</p>