这是我的代码:
def split_string(source,splitlist):
    sl = list(splitlist)
    new = source.split(sl)
    return new
当我运行它时:
print split_string("This is a test-of the,string separation-code!"," ,!-")
我有以下错误:
new = source.split(sl)
TypeError: expected a character buffer object
我怎样才能解决这个问题?
注意:首先我想制作一个列表,而不是我想要与列表中的每个元素splitlist拆分。sourcesl
谢谢。