使用正则表达式可以很好解决

import re
s = 'Hello!This?Is!What?I!Want'
ss = re.split('[!?]', s) 
ss = ['Hello', 'This', 'Is', 'What', 'I', 'Want']

 

相关文章:

  • 2022-12-23
  • 2021-07-02
  • 2021-07-19
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
  • 2021-11-21
  • 2022-02-15
相关资源
相似解决方案