When I run my function, allowing Codecademy to evaluate, I get the following output:
Oops, try again. Your function fails on reverse("Python!"). It returns "!nohtyPcba" when it should return "!nohtyP".
Note the added 'cba' appended to the output. However, if I add a print line and include the same input;
I see the expected output: !nohtyP
Not sure where the added 'cba' is coming from the Codecademy tests the function. I thought it might be related to how I initialize rev_text, and from reading other posts saw that I might try rev_text = None, but that also returned an error indicating; TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
text_in =  def reverse(text): for c in text: text_in.append(c) index = (len(text_in) - 1) rev_text = "" while index >= 0: rev_text = rev_text + text_in[index] index -= 1 return rev_text print rev_text print reverse("Python!")