title: Finding the variance of nth element in sublist in python
body: <p>I'm looking for the variance of the first element of each subarray in an array using python.</p>
  
  <p>The data looks like this...</p>
  
  <pre><code>INPUT = [[x1, y1, z1], [x2, y2, z2], [x3, y3, z3], ... [xn, yn, zn]]
  
  # Code magic
  
  OUTPUT = [x_var, y_var, z_var]
  </code></pre>
  
  <p>Is there any pythonic way to do this?</p>
  
  <p>I'm currently doing it this way. Please don't judge too harsh.</p>
  
  <pre><code>INPUT = [[1,2,3], [4,5,6], [7,8,9]]
  
  OUTPUTx = [item[0] for item in INPUT]
  OUTPUTy = [item[1] for item in INPUT]
  OUTPUTz = [item[2] for item in INPUT]
  
  OUTPUTx = numpy.var(OUTPUTx)
  OUTPUTy = numpy.var(OUTPUTy)
  OUTPUTz = numpy.var(OUTPUTz)
  
  OUTPUT = numpy.zeros(3)
  
  OUTPUT[0] = OUTPUTx
  OUTPUT[1] = OUTPUTy
  OUTPUT[2] = OUTPUTz
  </code></pre>