Traceback (most recent call last):
File "python", line 8, in
File "python", line 5, in reverse
IndexError: string index out of range
and Oops, try again. Your code looks a bit off--it threw a "string index out of range" error. Check the Hint if you need help!
I cannot figure out it is out of range. If i is length of text in my examle it should be new_word.join(text), then go down to 3,2,1 and the while loop should stop at 0.
def reverse(text): i = len(text) new_word='' while i >= 0: new_word.join(text[i]) i = i-1 print new_word reverse('abcd')