I am getting an Error which says "Oops, try again. Your function fails on reverse("Python!"). It returns " !nohtyP" when it should return "!nohtyP".
Unless I am missing something obvious the code and the response should work. Any help is appreciated.
def reverse(text): length = len(text) reverse_string = " " while length >= 1: reverse_string = reverse_string + text[length-1] length = length -1 return reverse_string