input: Write a function to determine if a given string is a palindrome. A palindrome is a word, phrase, number, or other sequences of characters that reads the same forward and backward (ignoring spaces, punctuation, and letter casing). This function should return True if the string is a palindrome and False otherwise.
  
  def is_palindrome(s):
    s = s.lower()
    left = 0
    right = len(s) - 1
    
    while left < right:
      if s[left] != s[right]:
        return False
      left += 1
      right -= 1
    return True
    
  print(is_palindrome("racecar"))
  print(is_palindrome("A man, a plan, a canal, Panama"))
  print(is_palindrome("hello"))
  print(is_palindrome("Madam"))
  print(is_palindrome(""))
  print(is_palindrome("Was it a car or a cat I saw?"))
  
  assert is_palindrome("racecar")==True
  assert is_palindrome("A man, a plan, a canal, Panama")==True
  assert is_palindrome("hello")==False
  assert is_palindrome("Madam")==True
  assert is_palindrome("")==True
  assert is_palindrome("Was it a car or a cat I saw?")==True
output: def is_palindrome(s):
    s = ''.join(e for e in s if e.isalnum()).lower()
    return s == s[::-1]