Not sure what is going on here, but whenever I use the code below, CodeAcademy spits out "Oops, try again. Your function fails on reverse("Python!"). It returns "None" when it should return "!nohtyP"."
I have tried this several times using the python that is already loaded on my computer, and it works perfectly. What is going on?
def reverse(text): text = str(text) charList =  reverseList =  for i in text: #Runs through the text string and appends each letter to the forwards-list charList.append(i) print "DEBUG: ", charList n = len(text)-1 while n >= 0: #runs through the forwards-list to reverse them reverseList.append(charList[n]) n -= 1 print "DEBUG: ", reverseList print ''.join(reverseList) #this should print out the reverse of the input