I'm stuck


#1



https://www.codecademy.com/en/courses/python-intermediate-en-rCQKw/1/1?curriculum_id=4f89dab3d788890003000096#

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

What's wrong now? Help me please


def reverse  (text):
    c=0
    l=list(text)
    while c<len(text):
        l.append(l[c])
        l.pop(c)
        c=c+1
        text="".join(l)
    return text


#3

i did try your code , so if you analyse image you can see that the variable c increase by 1 , and caracter that we want decrease by 1 and so on


i recommand you to increase variable c like this ( works for me )

def reverse  (text):
    c=len(text)-1
    l=list(text)
    while c>=0:
        l.append(l[c])
        l.pop(c)
        c-=1
        text="".join(l)
    return text

#4

Thanks for helping me)