Write a Python function to check if a given string is a palindrome or not. A palindrome
Fantastic news! We've Found the answer you've been seeking!
Question:
Write a Python function to check if a given string is a palindrome or not. A palindrome is a word, phrase, number, or other sequence of characters that reads the same forward and backward. The function should return True if the string is a palindrome and False otherwise.
For example, the string "racecar" is a palindrome, while the string "hello" is not.
Here's an example function signature to get started:
pythonCopy codedef is_palindrome(s: str) -> bool: # your code hereFeel free to use any approach you like to solve the problem
Related Book For
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen
Posted Date: