title: Using "r" with variables in re.sub
body: <p>I need to do this:</p>
  
  <pre><code>text = re.sub(r'\]\n', r']', text)
  </code></pre>
  
  <p>But with <code>find</code> and <code>replace</code> as variables:</p>
  
  <pre><code>find = '\]\n'
  replace = ']'
  text = re.sub(find, replace, text)
  </code></pre>
  
  <p>Where should I put <code>r</code> (raw)? It is not a string.</p>