DML School of Technology
Menu

Stretch, Strings

Palindromes

The task

A palindrome reads the same forwards and backwards. Ignore capital letters and spaces: "Never odd or even" is a palindrome.

Write a function called is_palindrome.

Tests

CallExpectedYours
is_palindrome('Racecar') True not run
is_palindrome('Never odd or even') True not run
is_palindrome('Lagos') False not run
is_palindrome('a') True not run

Next challenge · All challenges

solution.py

Tab indents. To leave the editor, press Escape, then Tab.

Output

Run prints what your code prints. Run the tests to check your function.