|
|
|
|
|
by collyw
2593 days ago
|
|
I did mention named parameters, you are using positional parameters to make your point. You don't even list the variables in your example. That seems pretty implicit to me. 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:
And with f-strings: f-strings is clearly more readable, concise and actually faster to run.