Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: Implement a function to check if a string is a palindrome.
Answer:

def is_palindrome(input_str):

return input_str == input_str[::-1]

Example:

is_palindrome('radar')  # Output: True
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook