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 anythin
The call signature of str.translate has changed and apparently the parameter deletechars has been removed. You could use
import re fline = re.sub('['+string.punctuation+']', '', fline)
instead, or create a table as shown in the other answer.