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 Evgeny_Sergeev
import re
def longest_palindromic(text):
for i in reversed(range(0,len(text)+1)):
n = len(text) - i
for j in range(n):
t = text[j:i+j+1]
l = re.findall(str(t[::-1]),text)
if bool(l) == True: return l[0]
Jan. 17, 2019