title: Summing specific values within an array in python
body: <p>I am trying to do operations with values that I have added into an array.</p>
  
  <p>step 1:</p>
  
  <p>Loaded a xls file with xlrd library and created an array.
  <a href="http://i.imgur.com/Ig6Lz3L.png" rel="nofollow">http://i.imgur.com/Ig6Lz3L.png</a></p>
  
  <p>Here is the code.</p>
  
  <pre><code>import xlrd
  
  datafile = "data.xls"
  workbook = xlrd.open_workbook(datafile)
  sheet = workbook.sheet_by_index(0)
  
  data = [[sheet.cell_value(r, col) 
              for col in range(sheet.ncols)] 
                  for r in range(sheet.nrows)]
  </code></pre>
  
  <p>I would like to sum all the values within a column
     <code>print (data[1][1])
      print (data[2][1])
      print (data[3][1])
      print (data[4][1])
      print (data[5][1])</code></p>
  
  <p>summ all the way to I (data[I][1]) ??</p>
  
  <p>like summing all the rows for the same column,</p>
  
  <p>i have tried to do sum data[1] but this sums all the values for the same row (like an horizontal sum of the values...) and I am trying to do a vertical sum)</p>