5. Longest Palindromic Substring - LeetCode Solution in Python