I'm in lesson 'reverse' (link below) and my code apparently is working, as I tested it and got the correct results on the console, but Codecademy doesn't approve it.
This is my code:
def reverse(text): result = "" n = len(text) - 1 for char in text: result += text[n] n -= 1 print result
and this is the error message I get:
"Oops, try again. Your function fails on reverse("Python!"). It returns "None" when it should return "!nohtyP"."
Is this a bug? Or my code is indeed incorrect in someway?
Thanks in advance!