title: Python Iterate Dictionary by Index
body: <p>I want to iterate through a dictionary in python by index number.</p>
  
  <p>Example :</p>
  
  <pre><code> dict = {'apple':'red','mango':'green','orange':'orange'}
  </code></pre>
  
  <p>I want to iterate through the dictionary from first to last, so that I can access the dictionary items by their indexes. For example, the 1st item will be apple, and the 2nd item will be mango and value will be green.</p>
  
  <p>Something like this:</p>
  
  <pre><code>for i in range(0,len(dict)):
      dict.i
  </code></pre>