Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
7-liner: Got Palindormes solution in Clear category for The Longest Palindromic by Stensen
def longest_palindromic(a):
answer = ''
for i in range(0, len(a)):
for j in range(1, len(a)+1):
if a[i:j] == a[i:j][::-1] and len(a[i:j]) > len(answer):
answer = a[i:j]
return answer
Oct. 24, 2020