使用正则表达式可以很好解决
import re s = ‘Hello!This?Is!What?I!Want‘ ss = re.split(‘[!?]‘, s) ss = [‘Hello‘, ‘This‘, ‘Is‘, ‘What‘, ‘I‘, ‘Want‘]
Python中同时用多个分隔符分割字符串的问题
原文:http://www.cnblogs.com/arhatlohan/p/4036729.html