title: Does Python dictionary ".values()" return the list in a particular order? [Python 2]
body: <p>I'm using a dictionary in Python 2, and am wondering if the dictionary.values() returns a list of values in a particular order</p>
  
  <p>i.e. the order they were given into the dictionary in?</p>
  
  <p>Example </p>
  
  <pre><code>dict = {}
  dict[1] = "potato"
  dict[2] = "tomato"
  dict[3] = "orange"
  dict[4] = "carrot"
  list_val = dict.values()
  </code></pre>
  
  <p>Is list_val in the order <code>potato-&gt;tomato-&gt;orange-&gt;carrot</code>?
  or is it in some other order?</p>
  
  <p>This is a simple example, I mean will it return in the same order for even more complex structures?</p>
  
  <p>For example, replace the strings with dictionaries
  making it a dictionary of dictionaries</p>
  
  <p><strong>NOTE: This was answered in the other thread, which is <a href="https://stackoverflow.com/questions/526125/why-is-python-ordering-my-dictionary-like-so">linked</a></strong></p>
  
  <p>Another good answer to refer to for conceptual answer is :
  <a href="https://stackoverflow.com/questions/32917590/why-are-python-dictionaries-not-stored-in-the-order-they-were-created?noredirect=1&amp;lq=1">This</a></p>