Learn Python - reverse


I get this error when running the below code. Please help me, thank you.

def reverse(text):
retxt = ""
while a >= 0:
retxt += text[a]
print retxt
Your function fails on reverse(“Python!”). It returns “None” when it should return “!nohtyP”.


Did you return retxt?
Hình như ông chưa có return thì phải.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.