[Palindrome] Completed Python example program