At Notion, you need a utility function that checks whether a given string reads the same forward and backward. Write a function that returns True if the input string is a palindrome and False otherwise.
sTrue if s is identical to its reverseFalse otherwiseA palindrome comparison in this problem is case-sensitive and includes all characters, including spaces, punctuation, and digits.
Example 1
Input: s = "racecar"
Output: True
"racecar" reads the same from left to right and right to left.
Example 2
Input: s = "hello"
Output: False
The first and last characters do not match, so the string is not a palindrome.
Example 3
Input: s = "abba"
Output: True
The characters match symmetrically around the center.
0 <= len(s) <= 10^5s may contain uppercase and lowercase letters, digits, spaces, and punctuation