python equiv of perl's split?

pete-temp-12-29-2002 at kazmier.com pete-temp-12-29-2002 at kazmier.com
Mon Jan 13 16:45:09 CET 2003


>>>> import re re.split("(:)", "test:one:two:three")
> ['test', ':', 'one', ':', 'two', ':', 'three']

Doh!  I didn't realize there was a split in the 're' module, I was
using the one from the 'string' module.  

Thanks for your quick response,
Pete




More information about the Python-list mailing list