import re

import string

t1 = re.split("["+string.punctuation+" ]","(555) 123-4567")

t2= re.split("["+string.punctuation+" ]","555.123.4567")

t1==t2

 

注意,"]" 前面有一个空格

相关文章:

  • 2021-08-01
  • 2021-10-26
  • 2022-01-21
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-11-16
猜你喜欢
  • 2021-12-23
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案