Python去除文本全部标点符号

去除标点符号方式多种多样,这里介绍两种本身经常使用的。python 一、python自带punctuation包,能够消除全部中文标点符号。string import re,string from zhon.hanzi import punctuation text = " Hello, world! 这,是:我;第!一个程序\?()()<>《》 " print(re.sub(r"[%s]+" %
相关文章
相关标签/搜索