Hi, wrt to the Medical Insurance Project in the Python Strings Exercise Im confused as to why the following code is only giving the last individual’s output.Any help is welcome, thanks in advance!
Code-
for records in medical_records_clean:
info =’{} is {} years old with a BMI of {} and an insurance cost of ${}.’
info = info.format(records[0],records[1],records[2],records[3])
print(info)
Output-
Average Insurance Cost: 8390.7
ISAAC VU is 34 years old with a BMI of 24.8 and an insurance cost of $7045.0.