title: How do I replace punctuation in a string in Python?
body: <p>I would like to <em>replace</em> (and not <em>remove</em>) all punctuation characters by " " in a string in Python.</p>
  
  <p>Is there something efficient of the following flavour?</p>
  
  <pre><code>text = text.translate(string.maketrans("",""), string.punctuation)
  </code></pre>