It gives me the error "Oops, try again. Your function fails on reverse("Python!"). It returns "['!', 'n', 'o', 'h', 't', 'y', 'P']" when it should return "!nohtyP"."

Can anyone help?

def reverse(text):
    res = []
    s = ""
    count = len(text) - 1
    while count > -1:
        count -= 1
    return res


Have you given any thought to what's different about those two values and what actions you'd need to carry out to go from one to the other? (describe what's stopping you from continuing)


I appreciate, the response, but I figured it out. I was return res, not the result of using .join on res. I figured it out!


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