title: What does a for loop within a list do in Python?
body: <p>Can someone explain the last line of this Python code snippet to me?</p>
  
  <p><code>Cell</code> is just another class. I don't understand how the <code>for</code> loop is being used to store <code>Cell</code> objects into the <code>Column</code> object. </p>
  
  <pre><code>class Column(object):
  
      def __init__(self, region, srcPos, pos):
  
          self.region = region
          self.cells = [Cell(self, i) for i in xrange(region.cellsPerCol)] #Please explain this line.
  </code></pre>