title: a simple sum of columns in a 2D list
body: <pre><code>import random
  
  ROWS = 3
  COLS = 3
  
  def main():
  
      values = [[0,0,0], [0,0,0], [0,0,0]]
      for r in range(ROWS):
          for c in range(COLS):
              values[r][c] = random.randint(1, 4)
      print('List:')
      print(values)
      print(sum(values[0]))
      print(sum(values[1]))
      print(sum(values[2]))
  
  main()
  </code></pre>
  
  <p>This is the code that I have written and what I would like to do is display the the individual totals for each column. For example, the final result would look like:</p>
  
  <pre><code>Total of column 0 is 7
  
  Total of column 1 is 6
  
  
  
  Total of column 2 is 7
  </code></pre>