title: Extract list of attributes from list of objects in python
body: <p>I have an <em>uniform</em> list of objects in python:</p>
  
  <pre><code>class myClass(object):
      def __init__(self, attr):
          self.attr = attr
          self.other = None
  
  objs = [myClass (i) for i in range(10)]
  </code></pre>
  
  <p>Now I want to extract a list with some attribute of that class (let's say attr), in order to pass it so some function (for plotting that data for example)</p>
  
  <p>What is the pythonic way of doing it,</p>
  
  <pre><code>attr=[o.attr for o in objsm]
  </code></pre>
  
  <p>?</p>
  
  <p>Maybe derive list and add a method to it, so I can use some idiom like</p>
  
  <pre><code>objs.getattribute("attr")
  </code></pre>
  
  <p>?</p>