title: Replace word in string using f-string
body: <p>In Python, I'm trying to insert a variable into an imported string that already contains the variable name - as pythonically as possible.</p>
  <p>Import:</p>
  <pre><code>x = &quot;this is {replace}`s mess&quot; 
  </code></pre>
  <p>Goal:</p>
  <pre><code>y = add_name(&quot;Ben&quot;, x) 
  </code></pre>
  <p>Is there a way to use f-string and lambda to accomplish this?  Or do I need to write a function?</p>