title: Python: TypeError: 'float' object is not subscriptable
body: <pre><code>def get_data(fp):
      data = []
      for line in fp:
          line_list_ints = [int(number) for number in line.split()]
          data.append(line_list_ints)
      return data
  
  def calculate_grades(data):
      for line in data:
          total_points = sum(line[1:6])
          grade = get_grade(total_points)
          data.insert(0,total_points)
          data.insert(1,grade)
      return data
  </code></pre>
  
  <p>I am getting the TypeError: 'float' object is not subscriptable for line 10. I do not understand why as I convert the numbers into ints before I append them into the data list. Can anyone help? Am I being clear enough?</p>