In my first attempt I wrote the Line 4 as 'word += str(i)' and it didn't work. After I changed it to 'word = str(i) + word', it worked. I don't think I understand what these two different codes do differently. Could you please explain it to me? How come one worked and the other not?
def reverse(text): word = '' for i in text: word = str(i) + word return word