I wound up scrapping this version of the function in favor of one that uses a while loop, but I'd like to know why this version didn't work. It produced the following error:
Oops, try again. Does your reverse function take exactly one argument (a string)? Your code threw a "unsupported operand type(s) for -: 'int' and 'str'" error.
def reverse(text): result = "" for x in text: result = result + text[len(text)-x] return result