Reverse


#1



<img src="//codecademy-discourse.s3.amazonaws.com/original/5X/b/5/1/c/b51cabf4574069f4976e0019430424e758899520.png" width="690" height="387">
Can someone please help?
Here is my code:
def reverse(text):
    letter = len(text)-1
    while letter >= 0:
        print text[letter],
        letter -= 1
reverse("Python!")


#2

Hi blogsolver53727,

I used a similar method than what you are trying when I complete this. The trick I used was to create an empty string above my loop and append the letter to that string with each iteration by using the += method. If you need any help with this, let me know and I"ll be glad to help out.


#3

Hi methodninja83420,
Thanks for helping me out! I was stuck for so long on this one!


#4

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