Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for The Longest Palindromic by Moff
def longest_palindromic(text):
result = ''
for i in range(len(text)):
for j in range(i, len(text)):
s = text[i:j+1]
if s[::-1] == s and len(s) > len(result):
result = s
return result
March 1, 2016