title: How to access a dictionary value inside a list of custom objects?
body: <p>I have the following toy object:</p>
  <pre><code>x = [Agg({   'name': 'James',
       'class': 'calculus1',
       'avg': 90}),
       Agg({   'name': 'Mary',
       'class': 'calculus1',
       'avg': 99})]
  
  </code></pre>
  <p>So the outer bracket [ indicates this is a list of the datatype Agg <s>pandas series?</s> (no, it is a class object - class Agg - see comments).  The outer parenthesis ( indicates to me the Agg is a <s>tuple</s> class object, and the { with key values indicates a dictionary.  I want to get the key values of 'avg' into a new list, <b>avgs</b> such that <code>avgs=[90,99,50,100]</code> I think the answer involves a list comprehension along the lines of <code>z = [x[0] for a in x]</code>, but I don't understand the syntax to access Agg.  How do I do this?</p>