title: Python: how to convert a dictionary into a subscriptable array?
body: <p>I know how to convert a dictionary into an list in Python, but somehow when I try to get, say, the sum of the resulting list, I get the error <code>'dict_values' object is not subscriptable</code>. Also, I plan to sum only several items in the list.</p>
  
  <pre><code>dict = {A:1, B:2, C:3, D:4}
  arr = dict.values()
  the_sum = sum(arr[1:3])
  </code></pre>
  
  <p>Upon closer inspection, I noticed that when the resulting list is printed out, it always gives <code>dict_values(......)</code> as the output which I can't remove. How do I get around this?</p>