def longestPalindrome(self, s):
        if not s:
            return
        n = len(s)
        if n == 1:
            return s

        ret = s[0]
        for i in xrange(0, n):
            cur = self.get_palindrome_from_center(s, i, i)  # odd length
            if len(cur) > len(ret): ret = cur
            cur = self.get_palindrome_from_center(s, i, i+1)
            if len(cur) > len(ret): ret = cur
        return ret
Runs the engine (or die trying).
dataset/ETHPy150Open algorhythms/LeetCode/005 Longest Palindromic Substring.py/Solution.longestPalindrome--crossover with--dataset/ETHPy150Open openstack/taskflow/taskflow/engines/action_engine/engine.py/ActionEngine.run