Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
straightforward solution in Clear category for The Longest Palindromic by ojisan
def longest_palindromic(text):
l = len(text)+1
r = [[s for s in [text[f:f+e] for f in range(l-e)] if s==s[::-1]] for e in range(1,l)]
r = list(filter(lambda x:len(x)>0,r))
return r[-1][0]
Aug. 25, 2018