title: Summing a list of integers then calculate the average
body: <p>I am trying to calculate the sum of element in my 2D list.
  but I get the error:</p>
  <pre class="lang-none prettyprint-override"><code>    sum_stu1 += sum(student)
  TypeError: unsupported operand type(s) for +: 'int' and 'list'
  </code></pre>
  <p>This is my full program: The actual program will be getting elements using user input for current list is for testing.</p>
  <pre><code>def average(x):
      sum_stu1 = 0
      for student in student_list:
          sum_stu1 += sum(student)
          return sum_stu1
  
  student1 = [10, 20, 30, 40, 50]
  student2 = [20, 30, 40, 50, 60]
  student3 = [30, 40, 50, 60, 70]
  student4 = [40, 50, 60, 70, 80]
  student5 = [50, 60, 70, 80, 90]
  
  student_list = [
      [student1],
      [student2],
      [student3],
      [student4],
      [student5]
  ]
  
  average(student_list)
  </code></pre>
  <p>My next line of thought once this part is resolved is:</p>
  <pre><code>for student in student_list:
      sum_stu1 += sum(student) / 5
  </code></pre>
  <p>to calculate the average as there is a max of 5 inputs - would this be right?</p>