← Back to challenges

Recursion: Palindrome Word

PythonHardrecursionstringsvalidation

Instructions

Create a recursive function that determines whether a word is a palindrome or not.

Examples

is_palindrome("madam") ➞ true

is_palindrome("adieu") ➞ false

is_palindrome("rotor") ➞ true

Notes

  • All inputs are in lowercase.
  • You are expected to solve this challenge via recursion.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.