So, this code appears to work perfectly; when I execute it, it prints "!nohtyP" as it should. The website, however, tells me:
Your function fails on reverse("Python!"). It returns "None" when it should return "!nohtyP".
So what's wrong here? Is this my code or some flaw in how the website is reading it?
def reverse(text): a= s = "" for char in text: a.insert(0, char) print s.join(a) reverse("Python!")