(Recursive Palindrome Check ) Implement the function is_palindrome_recursive() in the same program palindrome.py you created for the...
Fantastic news! We've Found the answer you've been seeking!
Question:
(Recursive Palindrome Check ) Implement the function is_palindrome_recursive() in the same program palindrome.py you created for the previous problem, using recursion, such that it returns True if the argument s is a palindrome, and False otherwise.
Again, you may assume that s is all lower case and doesn’t any whitespace characters. Hint: A string is a palindrome if the first character is the same as the last, and the rest of the string is a palindrome; an empty string is a palindrome.
>>> python palindrome.py bolto
False
>>> python palindrome.py amanaplanacanalpanama
True
Related Book For
Healthcare Management Organization Design and Behavior
ISBN: 978-1435488182
6th edition
Authors: Lawton Burns, Elizabeth Bradley, Bryan Weiner
Posted Date: