2017-10-25 python Chinese punctuation to English punctuation Python中:中文标点转换成英文标点123456789101112131415# In Python3, use str.maketrans insteadtable = {ord(f):ord(t) for f,t in zip( u',。!?【】()%#@&1234567890', u',.!?[]()%#@&1234567890')}t = u'中国,中文,标点符号!你好?12345@#【】+=-()'t2 = t.translate(table)'''>>> print t2中国,中文,标点符号!你好?12345@#[]+=-()'''作者:灵剑链接:https://www.zhihu.com/question/37720196/answer/115870233来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 链接 Newer awk filter by one col larger than a value Older use sed print certain lines