import re def split(text, separators): return filter(None, re.split("|".join(map(re.escape, separators)), text)) separators = raw_input()text = raw_input()print split(text, separators)
. After the flood ... all the colors came out.
['After', 'the', 'flood', 'all', 'the', 'colors', 'came', 'out']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!