Possible Duplicate:
Python: Split string with multiple delimiters
I have a small syntax problem. I have a string and another string that has a list of seperators. I need to split it via the .split method.
I can’t seem to figure out how, this certainly gives a Type error.
String.split([' ', '{', '='])
How can i split it with multiple seperators?
str.split()only accepts one separator.Use
re.split()to split using a regular expression.Output: