title: Unwanted backslash ("\") appears in a string
body: <p>I have the following function that constructs and returns a string (used to create a formula for Excel).</p>
  <pre><code>def create_hyperlink_formula(target_sheet,link_text):
      a = &quot;&quot;&quot;=HYPERLINK(&quot;#'{target_sheet}'!$A$1),&quot;{link_text}&quot;)&quot;&quot;&quot;.format(target_sheet=target_sheet,
                                                                          link_text = link_text)
      return a
  </code></pre>
  <p>So by running:</p>
  <pre><code>create_hyperlink_formula(target_sheet = &quot;Cover&quot;, link_text = &quot;Return to cover page&quot;)
  </code></pre>
  <p>My desired result is as follows:</p>
  <blockquote>
  <p>=HYPERLINK(&quot;#'Cover'!$A$1),&quot;Return to cover page&quot;)</p>
  </blockquote>
  <p>But instead I get this:</p>
  <blockquote>
  <p>=HYPERLINK(&quot;#\'Cover\'!$A$1),&quot;Return to cover page&quot;)</p>
  </blockquote>
  <p>I cannot seem to get rid of the unwanted backslashes (&quot;\&quot;) in this string.</p>
  <p>I am completely lost as to why that happens and how to fix that. Even a workaround would help me a lot at this point, as string.replace() method doesn't help here either.</p>
  <p>Many thanks in advance.</p>