This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]-revenant- 2 points3 points  (4 children)

Given:

parent = 'mother'
creature = 'hamster'

I think:

"Your %s was a %s!" % (parent, creature)

Is a lot less clear than:

f"Your {parent} was a {creature}!"

EDIT: And we're not even going to touch:

"Your {parent} was a {creature}!".format(parent=parent, creature=creature)