import re
import string
t1 = re.split("["+string.punctuation+" ]","(555) 123-4567")
t2= re.split("["+string.punctuation+" ]","555.123.4567")
t1==t2
注意,"]" 前面有一个空格