The built-in <string>.split()
procedure works only uses whitespace to split the string.
I'd like to define a procedure, split_string, that takes two inputs: the string to split and a string containing all of the characters considered separators.
The procedure should return a list of strings that break the source string up by the characters in the list.
def split_string(source,list):
...
>>> print split_string("This is a test-of the,string separation-code!",",!-")
['This', 'is', 'a', 'test', 'of', 'the', 'string', 'separation', 'code']