Is there any equivalent to str.split in Python that also returns the delimiters?
str.split
I need to preserve the whitespace layout for my output after processing som
>>> re.compile(r'(\s+)').split("\tthis is an example") ['', '\t', 'this', ' ', 'is', ' ', 'an', ' ', 'example']