Correct output but i get error


Oops, try again. Your function fails on reverse("Python!"). It returns "None" when it should return "!nohtyP".

why do i get that error even though output is correct

def reverse(text):
    length = len(text)
    while length>0:
        print text[length-1]


you need to return the reversed string


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.