title: How does the dictionary add keys in python?
body: <p>When I run the code and change my range to 1, I get what I expect when I set the range to 2 I still get the first 2 sets I the right order once I tell it to adda third set they are no longer in order (the newest item added is not put at the end). Why is this/what is the rule for determining where the newest item will be placed in a dictionary?</p>
  
  <pre><code>coded2 = []
  for char in coded:
      coded2.append(char)
  
  plain2 = []
  for char in plain:
      plain2.append(char)
  
  i = 0
  d = {}
  
  for num in range(5):
      d[coded2[i]] = plain2[i]
      i += 1
  print d
  </code></pre>