title: Python: Sort dictionary based on tuple value. List output
body: <p>I would like to sort a dictionary based on <strong>one</strong> of the tuple values. Consider the following dictionary example:</p>
  
  <pre><code>my_dict = {"apple": (8, 1023), "ant": (3, 29883), "zebra": (4, 489)}
  </code></pre>
  
  <p>Say I would like to sort it based on the first index in the tuple value in the case of the <code>apple</code> key it would be the number 8. So I'd expect my output to be</p>
  
  <pre><code>["ant", "zebra", "apple"]
  </code></pre>
  
  <p>I know I could use something like</p>
  
  <pre><code> x = sorted(my_dict, key = my_dict.get)
  </code></pre>
  
  <p>But as you can guess, that doesn't work for tuple/list values. Any help would be appreciated!</p>