Write a function that, given a string, returns its longest palindromic substring. A palindrome is dened as a string that is written the same forward and backward. Assume that there will only be one longest palindromic substring. Sample input:"abaxyzzyxf" Sample output:"xyzzyx"
Check this Python code.