python 对string去掉标点符号

delset = string.punctuation

l = line.translate(None,delset)

print l 即为去掉标点符号的 string,而line本身没有变化