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 maxadamski
def longest_palindromic(text):
for s in range(len(text), 0, -1):
for i in range(0, len(text) - s + 1):
sub = text[i:i + s]
if sub == sub[::-1]:
return sub
Oct. 21, 2017
Comments: