Oops, try again. Your function fails on reverse("Python!"). It returns "[, , , , , , ]" when it should return "!nohtyP".
Could you help me please? I am trying to understand what is my mistake in this function. Why is it returning numbers while the argument is a string?
Thanks in advance!
def reverse(text): n=len(text) test= while n>0: test.append(n-1) n-=1 return test reverse('Python!')