SQLDAXExcelPython
Leaderboard
Core PythonEasy10 points

Check for a palindrome

Complete is_palindrome(text) so it returns True when the text reads the same both ways. Ignore capital letters and spaces.

How your answer is tested

After your code, this runs and its result is checked:

result = [is_palindrome(t) for t in ["Level", "Nurses run", "Python", "a"]]
Show solutionLifetime

Real Python running in your browser through Pyodide, with pandas available. Nothing you type is sent to a server unless you save a score.

Python
Loading editor…

Press Ctrl+Enter or Run to see the result here.