coding
Longest palindrome (Python)
Prompt
Write a Python function longest_palindrome(s: str) -> str that returns the longest palindromic substring of s (return the first one if there is a tie). It should run in O(n^2) time or better. Include three assert-based test cases.
Answers will appear here after the first test run.