This validates correctly on Codecademy, but won't run on another IDE (repl.it). Is there something wrong with this?
Also I took a different approach than most of the other solutions. Is mine less efficient? Is there anything that is not pythonic?
Maybe my solution will help someone else.
def reverse(text): r = len(text) #find the length of text newtext = '' #sets up as string while r > 0: newtext = newtext+text[r-1] r -= 1 return newtext print reverse('Python!')