The first one works, but I cheated by googling insert, so I tried again.
After reading through the forum, I got the part about
word.append(text[len(text) - i])
But why do I have to add -1 to that? isnt i in the first one 0? Then it should be appending the last letter, but it obviously does something else, because the error message said "index out of range something something"
What exactly is the loop doing with and without the -1?
Thanks for your help!
#def reverse(text): # word =  # for i in text: # word.insert(0,i) # return ''.join(word) #print reverse('this') def reverse2(text): word =  for i in range(len(text)): word.append(text[len(text)-i-1]) return ''.join(word) print reverse2('hello')