Here is my code:
def split_string(source,splitlist):
sl = list(splitlist)
new = source.split(sl)
return new
When i run it:
print split_string("This is a test-of the,string separation-code!"," ,!-")
I have the following error:
new = source.split(sl)
TypeError: expected a character buffer object
How can I fix this?
Note: first i want to make a list from splitlist
than i want split source
with every element in my sl
list.
Thanks.