title: Get column from 2D list in Python
body: <p>I have a 2D list and like to get individual column from the list.</p>
  
  <pre><code>          X=[]
            for line in lines:
               c,xmin,ymin,xmax,ymax = line.split(' ')
               xmin_ = float(xmin)
               ymin_ = float(ymin)
               xmax_ = float(xmax)
               ymax_ = float(ymax)
               area_ = (xmax_ - xmin_)*(ymax_ - ymin_)
               X.append(xmax_-xmin_, ymax_-ymin_, area_)
  </code></pre>
  
  <p>If I print column values, I have error as</p>
  
  <pre><code>&gt;&gt;&gt;X[:,1]
  
  *** TypeError: list indices must be integers, not tuple
  </code></pre>
  
  <p>But why the following example works</p>
  
  <pre><code>&gt;&gt;&gt; a = arange(20).reshape(4,5)
  
  &gt;&gt;&gt; a
  array([[ 0,  1,  2,  3,  4],
         [ 5,  6,  7,  8,  9],
         [10, 11, 12, 13, 14],
         [15, 16, 17, 18, 19]])
  
  &gt;&gt;&gt; a[:, 1]
  array([ 1,  6, 11, 16])
  </code></pre>
  
  <p>What is the difference?</p>