发布时间:2019-09-22 07:41:01编辑:auto阅读(2548)
Python版本:3.4.1
>>> import re
>>> punc = '[,.!\']'
>>> data = 'a,b.c!d\''
>>> print (re.sub(punc, '', data))
abcd
上一篇: python改变索引总结
下一篇: python 常用包总结
54369
41113
35641
31223
26131
25846
24325
19866
15914
15366
2200°
2029°
2118°
2221°
2201°
2384°
2349°
2165°
2231°
2209°