Hello, I've been stuck at this exercise. Please help.
def reverse(text): rev_word = "" length = len(text) for i in range(0,length): rev_word = rev_word + str(text)[length-i] return str(rev_word) File "python", line 5 SyntaxError: can't assign to function call Oops, try again. Did you create a function called reverse? Your code threw a "global name 'reverse' is not defined" error.
Why does it think that function "reverse" is not defined if it IS?
Sure, I can solve this exercise with use of list and .append() like everyone else do in related topics, but concatenation should be viable too and I need to know what's wrong here.