I am stuck at the reverse string excercise
My code is this
def reverse (x): n = len(x) - 1 s = ' ' while n >= 0: s = s + x[n] n = n -1 return s
It gives an error saying
"Oops, try again. Your function fails on reverse("Python!"). It returns " !nohtyP" when it should return "!nohtyP".
My output is correct but still I couldn't pass the exercise. I don't know why.