"My name is {}, I'm {}'{}'' tall and live in {}".format(name, location, feet, inches)
This error is much better hidden than in the equivalent: f"My name is {name}, I'm {location}'{feet}'' tall and live in {inches}." "My name is {}, I'm {}'{}'' tall and live in {}".format(name, location, feet, inches)
This error is much better hidden than in the equivalent: f"My name is {name}, I'm {location}'{feet}'' tall and live in {inches}."I think this is more explicit:
"My name is {name}, I'm {feet} tall and live in {location}.".format(name="Bob", location="USA", feet=7)
Your actual example would be:
"My name is {name}, I'm {feet} tall and live in {location}.".format(name=name, location=location, feet=feet)
And with f-strings: f"My name is {name}, I'm {feet} tall and live in {location}."
f-strings is clearly more readable, concise and actually faster to run.If its faster to run, then fair enough.
"My name is {name}, I'm {feet} tall and live in {location}.".format(name="Bob", location="USA", feet=7)
is less explicit than
"My name is Bob, I'm 7 feet tall and live in USA."