The goal of this exercise was to create function that returns the characters of a string in reverse. What is the wrong with my code? Please identify if it is a syntax error of some sort, a fundamental error in the way I am going about completing this exercise, or another error of some sort. Please be specific on what I am doing incorrectly.
text = str(text) # I convert any input into a string length = len(text) word = "" while length - 1 >= 0: word = word + "%s" (text[length-1])# i concatenate each succesive character length = length - 1 return word
Thank you for having read thus far, and thank you for your answer. If something is unclear in what I am trying to do in my code, please ask, and I will respond.