title: What is x[ : , 0]?
body: <p>I don't understand what it does, and only saw it used by a sklearn-object.
  On trying some testing like this</p>
  <pre><code>x = [(1, 2), (2, 3), (3, 4)]
  y = [[1, 2], [2, 3], [3, 4]]
  
  print(y[:, 0])
  </code></pre>
  <p>I got this error (with both x and y):</p>
  <pre><code>TypeError: list indices must be integers or slices, not tuple
  </code></pre>
  <p>My assumption was that the <code>:</code> before the comma tells Python to take all entries, while the <code>0</code> specifies which 'subset'.</p>
  <p>How does one use this expression properly and what does it do?</p>