title: How to remove punctuation marks from a string in Python 3.x using .translate()?
body: <p>I want to remove all punctuation marks from a text file using .translate() method. It seems to work well under Python 2.x but under Python 3.4 it doesn't seem to do anything. </p>
  
  <p>My code is as follows and the output is the same as input text.</p>
  
  <pre><code>import string
  fhand = open("Hemingway.txt")
  for fline in fhand:
      fline = fline.rstrip()
      print(fline.translate(string.punctuation))
  </code></pre>