title: Delete punctuation marks and return a meaningful sentence - Python
body: <p>I am using the following code to delete punctuation marks from a sentence:</p>
  
  <pre><code>   import string
     translator = str.maketrans({key: None for key in string.punctuation})
  
     s = "I am,a boy"
     print(s.translate(translator))
  </code></pre>
  
  <p>But when for example, s = "I am,a boy", the output is "I ama boy", I want the output to be " I am a boy" (with space b/n "am" &amp; "a"). But if originally there was a space,as in s= "I am, a boy", I want the output to be "I am a boy" i.e. just delete the punctuation mark. </p>