The use of .format

(The project I am working on is the Python Strings: Medical Insurance Project)
Hey guys, I am confused by what is shown in the screenshots. I think I have called variables and used .format correctly, but it appears all the way “{names} is {ages} years old with a BMI of {bmis} and an insurancce cost of {insurance_costs}.” Can anyone please help me with this? Thanks in advance.

.format will return a new string, it wont alter the original string.
so for,
a = “Hi, i’m {name}”

wont change anything, as it’s not assigned to anything.
b = a.format(name=“ME!”)
would change b, so,
b = “Hi, i’m ME!”
or you could use;
and it would print out
HI, i’m ME!
but a would remain unchanged, so if you tried printing it out you’d still get;

Hi, i’m {name}

So, in your case message isn’t being altered by the line that contains format. To change this you could either put that whole statement inside a print statement;
print(message.format(names… …))
or you could assign it to a new variable and print that;
new_message = message.format(nam…)

Hope that helps