When I run this code it prints out "!nohtyP" just like it's supposed to, however I'm getting this error below.
Oops, try again. Your function fails on reverse("Python!"). It returns "!nohtyPcbaPython!" when it should return "!nohtyP".
Is there something i'm missing? It's returning the correct value since it's printing the exact string it's supposed to.
letlist =  def reverse(text): for i in text: letlist.append(i) # print letlist for i in text: count = 0 letlist.insert(count, (letlist.pop(letlist.index(i) - count))) # print letlist count = count - 1 return ''.join(letlist) print reverse("Python!")