Why doesn't this code work? 7/15reverse


No idea why it doesn't work.
It works offline perfectly.
Is the interpreter broken?

It tell me : Oops, try again. Your code looks a bit off--it threw a "string index out of range" error. Check the Hint if you need help!

x = raw_input("Which word or phrase do you want reverse?:")
strlst = []
tmplst = []
def reverse(x):
  for e in x:
  le = len(strlst)
  for e in strlst:
    le = le-1
  print "".join(tmplst)



for validation the exercise is going to call the function (just the function, not the whole script) multiply times, so you should declare your empty lists inside the function


I was thinking that it was going to be the validation process.
Thank you for your help