fork download
  1. import re
  2.  
  3. def split(text, separators):
  4. return filter(None, re.split("|".join(map(re.escape, separators)), text))
  5.  
  6. separators = raw_input()
  7. text = raw_input()
  8. print split(text, separators)
Success #stdin #stdout 0.03s 6684KB
stdin
 .
After  the flood   ...  all the colors came out.
stdout
['After', 'the', 'flood', 'all', 'the', 'colors', 'came', 'out']