title: Python select ith element in OrderedDict
body: <p>I have a snippet of code which orders a dictionary alphabetically.
  Is there a way to select the ith key in the ordered dictionary and return its corresponding value? i.e.</p>
  
  <pre><code>import collections
  initial = dict(a=1, b=2, c=2, d=1, e=3)
  ordered_dict = collections.OrderedDict(sorted(initial.items(), key=lambda t: t[0]))
  print(ordered_dict)
  
  OrderedDict([('a', 1), ('b', 2), ('c', 2), ('d', 1), ('e', 3)])
  </code></pre>
  
  <p>I want to have some function along the vein of...</p>
  
  <pre><code>select = int(input("Input dictionary index"))
  #User inputs 2
  #Program looks up the 2nd entry in ordered_dict (c in this case)
  #And then returns the value of c (2 in this case)
  </code></pre>
  
  <p>How can this be achieved?
  Thanks.</p>
  
  <p>(Similar to <a href="https://stackoverflow.com/questions/10058140/accessing-items-in-a-ordereddict">Accessing Items In a ordereddict</a>, but I only want to output the value of the key-value pair.)</p>