Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for The Longest Palindromic by omikojangebashvili
def longest_palindromic(text):
res = ''
for i in range(len(text)):
for j in range(i,len(text)+1):
if text[i:j] == text[i:j][::-1]:
res = max(res,text[i:j],key = lambda x : len(x))
return res
March 11, 2018