Python Strings: Medical Insurance Project #20 TypeError: float() argument must be a string or a number, not 'list'

Hello, I am attempting to complete the medical insurance project portion on strings:
https://www.codecademy.com/paths/data-science/tracks/dscp-python-fundamentals/modules/dscp-python-strings/projects/ds-python-strings-project

Here is my code:

updated_medical_data = medical_data.replace("#","$")
num_records = 0
for i in updated_medical_data:
  if i == "$":
    num_records += 1

print("There are {} medical records in the data".format(num_records))

medical_data_split = updated_medical_data.split(";")

medical_records = []
for i in medical_data_split:
  medical_records.append(i.split(","))
# print(medical_records)

medical_records_clean = []
for record in medical_records:
  record_clean = []
  for item in record:
    record_clean.append(item.strip())
  medical_records_clean.append(record_clean)

print(medical_records_clean)

for record in medical_records_clean:
  print(record[0].upper())

names =[]
ages = []
bmis = []
insurance_costs = []

for record in medical_records_clean:
  names.append([record[0]])
  ages.append([record[1]])
  bmis.append([record[2]])
  insurance_costs.append(record[3].replace('$',''))

print(names)
print(ages)
print(bmis)
print(insurance_costs)

total_bmi = 0
for bmi in bmis:
  total_bmi += float(bmi)

This last portion of code is as suggested in the hint but yields an error:
Traceback (most recent call last):
File “script.py”, line 61, in
total_bmi += float(bmi)
TypeError: float() argument must be a string or a number, not ‘list’

Please help me figure out what in the world to do, this is rather frustrating that the hint led me into an error.

insurance_costs.append(record[3].replace('$',''))

Why is that in there twice? Shouldn’t it be this?:
insurance_costs.append(record[3])

Double check how you’re appending here. Are there too many [ ] ?

for record in medical_records_clean:
  names.append([record[0]])
  ages.append([record[1]])
  bmis.append([record[2]])

Also, is that all your code for this particular part? Isn’t there more to that section?

What I find helpful is putting each of the code steps into different cells in either a Jupyter or Colab notebook, and then running the cells to see if you get the desired output or if there’s an error. When you have one giant code block the error message might not be exactly where the error is, but above it.