Practice makes Perfect - Reverse: HELP!


This is my code, but for some reason it doesn't work. Can anybody help me, please!? Thanks!

def reverse(text):
    result = ""
    for c in range(len(text), 0, -1):
        result += text[c]
    return result


You will want to be sure the loop reaches index [0] so set the stop value to -1.


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