Traceback (most recent call last):
File "python", line 8, in
File "python", line 6, in reverse
IndexError: string index out of range
i can't seem to understand what is wrong here.Please help.
def reverse(text): x = len(text) new_word = "" for i in range(0,x+1): i = x new_word = new_word + text[i] x -= 1 reverse('hem')