title: How does the memory allocation work in python dictionaries?
body: <p>I want to understand how works the memory allocation in python when adding new data to a dictionary. In the code below, I was waiting that every new added data was stacked at the end, however it does not happen.</p>
  
  <pre><code>repetitions = {}
  for item in new_deltas:
      list_aux = []
      if float(item[1]) &lt;= 30:
          if float(item[0]) in repetitions:
              aux = repetitions[float(item[0])]
              aux.append(item[1])
              repetitions[float(item[0])] = aux
          else:
              list_aux.append(item[1])
              repetitions[float(item[0])] = list_aux
      print(repetitions)
  </code></pre>
  
  <p>The results I got are as below. Thus, I would like to understand why the new appended data is not added at the end of the stack, it is added in the middle of it.
  <br><br>
  My input data is: </p>
  
  <pre><code>new_deltas = [[1.452, 3.292182683944702], [1.449, 4.7438647747039795], [1.494, 6.192960977554321], [1.429, 7.686920166015625]] 
  </code></pre>
  
  <p>The print line outputs:</p>
  
  <pre><code>{1.452: [3.292182683944702]}
  {1.452: [3.292182683944702], 1.449: [4.7438647747039795]}
  {1.452: [3.292182683944702], 1.494: [6.192960977554321], 1.449: [4.7438647747039795]}
  {1.429: [7.686920166015625], 1.452: [3.292182683944702], 1.494: [6.192960977554321], 1.449: [4.7438647747039795]}
  </code></pre>