Reverse: code works but I can't progress!


Hello there

I mean my code is literally displaying "!nohtyP" right in front of my eyes yet I get the error message? What else am i supposed to do??

Any help would be greatly appreciated!

Code below for reference:

def reverse(text):
    text = str(raw_input("Enter a word: "))

    text_list = []

    for c in text:

    print text_list

    text_list_reversed = []
    for i in range(len(text_list)):
        text_list_reversed.append(text_list[len(text) - 1 - i])
    print text_list_reversed
    return ''.join(text_list_reversed)
print reverse(text)


place the prompt outside the function, and pass the result of the prompt as argument

placing prompt inside the function, will overwrite the function parameter


ok yeah that works, thank you so much