# 去除英文标点符号import stringtest = 'today is friday, so happy..!!!'punctuation_en = string.punctuation # punctuation: 标点符号for i in punctuation_en:test = test.replace(i, '')# 去除中文标点符号, 需要提前按照zhon包 from zhon.hanzi import punctuationtest = '今天周五,下班了,好开心呀!!'for i in punctuation:test = test.replace(i, '')
1200字范文,内容丰富有趣,写作的好帮手!