博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
string.punctuation
阅读量:6909 次
发布时间:2019-06-27

本文共 144 字,大约阅读时间需要 1 分钟。

string.punctuation:找出字符串中的所有的标点(针对英文)

str='dfaggfgfg,fdfad'

l = str.translate(None,string.punctuation)

将str按照string.punctuation规则转换,即标点符合转换成None

转载地址:http://jfbcl.baihongyu.com/

你可能感兴趣的文章
winform:界面加载时自定义选中Button
查看>>
第四周总结
查看>>
maven-surefire-plugin:jar:2.12.4 has not been downloaded from it before.
查看>>
PXE 自动安装物理机 (DHCP服务由路由提供, 不能再配置)
查看>>
Python中的单例模式
查看>>
Android开发基础知识
查看>>
Ubuntu的快捷键
查看>>
视频压缩编码问答--转载
查看>>
android ListView中使用notifyDataSetChanged()不刷新
查看>>
Sandcastle入门:创建C#帮助文档
查看>>
[bzoj 4036][HAOI2015]按位或
查看>>
Django的ModelForm
查看>>
C++对象指针—指向对象成员的指针
查看>>
supermap使用小结
查看>>
FocusBI:地产分析&雪花模型
查看>>
ZOJ 3870 Team Formation 位运算 位异或用与运算做的
查看>>
UITabBar背景替换
查看>>
SharePoint2013 App 开发中 自定义网站栏,内容类型,列表。
查看>>
Fitnesse - Slim Tables
查看>>
华硕笔记本无法U盘启动,快捷键识别不了
查看>>