如何删除unicode字符串的标点?(无法删除quatation标记)

时间:2016-05-25 18:17:29

标签: python string unicode

import string
translate_table = dict((ord(char), None) for char in string.punctuation)   
tester=u'“What were the maester’s words?” Jaime asked.The bacon crunched when he bit into it.'
print sample.translate(translate_table)

- >“什么是主人的话”Jaime问道,当他咬着它时,培根嘎吱作响

引号仍然存在。如何一次删除所有标点符号?

0 个答案:

没有答案
相关问题