input: Write a python function to find the longest prefix palindrome in a string.
  assert longest_prefix_palindrome("abca") == "a"
  assert longest_prefix_palindrome("racecar") == "racecar"
  assert longest_prefix_palindrome("abccba") == "abccba"
  assert longest_prefix_palindrome("abcdefg") == "a"
  assert longest_prefix_palindrome("a") == "a"
output: def longest_prefix_palindrome(s):
      def is_palindrome(sub):
          return sub == sub[::-1]
      
      for i in range(len(s), 0, -1):
          if is_palindrome(s[:i]):
              return s[:i]
      return ""