In Python, I'm trying to insert a variable into an imported string that already contains the variable name - as pythonically as possible.
Import:
x = "this is {replace}`s mess"
Goal:
y = add_name("Ben", x)
Is there a way to use f-string and lambda to accomplish this? Or do I need to write a function?