黑松山资源网 Design By www.paidiu.com

网上看到的python去掉字符串中的标点符号的方法,大多是基于python2的,不适用python3,调整后代码如下:

代码

lower_case_documents = ['Hello, how are you!','Win money, win from home.','Call me now.','Hello, Call hello you tomorrow"_blank" href="https://stackoverflow.com/questions/265960/best-way-to-strip-punctuation-from-a-string-in-python" rel="external nofollow" >https://stackoverflow.com/questions/265960/best-way-to-strip-punctuation-from-a-string-in-python

以上这篇python3去掉string中的标点符号方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持。

黑松山资源网 Design By www.paidiu.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
黑松山资源网 Design By www.paidiu.com