title: How can I selectively escape percent (%) in Python strings?
body: <p>I have the following code</p>
  
  <pre><code>test = "have it break."
  selectiveEscape = "Print percent % in sentence and not %s" % test
  
  print(selectiveEscape)
  </code></pre>
  
  <p>I would like to get the output:</p>
  
  <pre><code>Print percent % in sentence and not have it break.
  </code></pre>
  
  <p>What actually happens:</p>
  
  <pre><code>    selectiveEscape = "Use percent % in sentence and not %s" % test
  TypeError: %d format: a number is required, not str
  </code></pre>