Home / Challenges / Palindrome Checker

Palindrome Checker

Medium
Write a function is_palindrome(s) that returns True if the string is a palindrome, False otherwise.

A palindrome reads the same forwards and backwards. Ignore case and spaces.

Examples:
- "racecar" → True
- "A man a plan a canal Panama" → True
- "hello" → False

Input

A string

Output

True or False

Example

Input
racecar
Output
True
⚡ 20 XP on solve ← Back to lesson

Your Solution

Output
Click "Run" to execute your code...

Log in to submit your solution and earn XP.