This passes:

```
class Solution(object):
def longestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
dp = [[False for i in range(len(s))] for j in range(len(s))]
best = [0,-1]
for l in range(1, len(s)+1):
for start in range(len(s)+1-l):
end = start+l-1
if s[start] == s[end] and (l < 3 or dp[start+1][end-1]):
dp[start][end] = True
if end-start > best[1]-best[0]:
best = [start, end]
return s[best[0]:best[1]+1]
```

This doesnt:

```
class Solution(object):
def longestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
dp = [[False for i in range(len(s))] for j in range(len(s))]
best = [0,-1]
for l in range(1, len(s)+1):
for start in range(len(s)+1-l):
end = start+l-1
dp[start][end] = s[start] == s[end]
if l > 2:
dp[start][end] &= dp[start+1][end-1]
if dp[start][end] and end-start > best[1]-best[0]:
best = [start, end]
return s[best[0]:best[1]+1]
```

Due to extra "if" checks? Seems a bit silly to me...