How to ensure update() adds to end of dictionary
<p>I've read that <a href="http://stackoverflow.com/questions/20110627/print-original-input-order-of-dictionary-in-python">OrderedDict</a> can be used to keep information in a dictionary in order, but it seems to require that you input the information while instantiating the dictionary itself.</p>

<p>However, I need to be able to use update() multiple times in a for loop and ensure the each entry gets added to the <em>end</em> of the dictionary. Is there a way to do that?</p>

<p>Here's a visual of what I'm talking about</p>

<pre><code>for e in entryList:
    myDict.update({e[2]: e[3]})
</code></pre>

<p>This enters all the new info, but doesn't keep it in order.</p>

<p>@Bob, please refer to the docs here. <a href="https://docs.python.org/3.5/library/collections.html?highlight=ordereddict#collections.OrderedDict" rel="nofollow">https://docs.python.org/3.5/library/collections.html?highlight=ordereddict#collections.OrderedDict</a></p>

<p>It says:</p>

<blockquote>
  <p>The OrderedDict constructor and update() method both accept keyword
  arguments, but their order is lost because Pythonâs function call
  semantics pass in keyword arguments using a regular unordered
  dictionary.</p>
</blockquote>

<p>However, there's a workaround added in 3.2: (from the same page)</p>

<blockquote>
  <p>move_to_end(key, last=True) Move an existing key to either end of an
  ordered dictionary. The item is moved to the right end if last is true
  (the default) or to the beginning if last is false. Raises KeyError if
  the key does not exist.</p>
</blockquote>

<p>I hope that answers the question.</p>

python dictionary