My code results in this error message: (" Oops, try again.
Your code looks a bit off--it threw a "list index out of range" error. Check the Hint if you need help! ")
Can you please explain my mistake or thinking error? Thank you very much!
I expect it to first add every letter of the text to the list and then overwrite each letter by the letter at the end of the text to create a reversed list. Finally, the code should convert the list back into a string by join function and return the converted string.
def reverse (text): lst=  for c in text: lst.append(c) n = 0 while n<len(lst): lst[n] = lst[len(lst)] n+=1 return "".lst.join