7/15 - Help. Thanks


Hi, my codes are:

def reverse(text):

listA = []
num = len(text)-1

for n in text:
    num -= 1

print "".join(listA)

When I ran it, it kept on saying: [Oops, try again. Does your reverse function take exactly one argument (a string)? Your code threw a "'builtin_function_or_method' object has no attribute 'getitem'" error. ]
What does the error message mean? What's wrong with my codes? Thank you



you have to change listaA.append[num] to listA.append(num).

Hope it helped.