Reverse


#1



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


I get this error message. Is this the correct way to try and go about this code or should i start over from scratch

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

EDIT:
ive gotten to work now. just having trouble joining the list to a string for some reason. what is the proper way to make a list into a string?


Reverse the string


def reverse(text):
    answer = list(text)
   
    real = []
    count = 1
    for x in answer:
        real.append(answer[len(answer)-count])
        print answer
        count = count+1
    
    return real
        
        
    
print reverse("python")


#2

there is a built in .join() which i recommend you to use. Check documentation on how to use it


#4

I got it thanks for the help!


#5