7. reverse - Weird error?


Not sure what's happening, but this is my code:

word = ["krankenleutenhausauto"]

def reverse(text):
    finalstring = []
    test = str(text)
    letters = str.split(test, len(test))
    for letter in letters:
    return finalstring

print reverse(word)

and this is the weird error I get:

Oops, try again. Does your reverse function take exactly one argument (a string)? Your code threw a "expected a character buffer object" error.


If word is meant to be a string, then why dress it as a list? I fail to see how you do not see the error message for what it is. It asks the same question.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.