input: Write a function to determine if a given string is a palindrome when all non-alphanumeric characters are removed and case is ignored. If it is a palindrome return True, otherwise return False.
  def is_palindrome(s):
      s = ''.join(e for e in s if e.isalnum()).lower()
      return s == s[::-1]
  
  assert is_palindrome("A man, a plan, a canal, Panama!")==True
  assert is_palindrome("race a car")==False
  assert is_palindrome("")==True
output: def is_palindrome(s):
      s = ''.join(e for e in s if e.isalnum()).lower()
      return s == s[::-1]