Longest Palindrome by Doug L

while 1:
 c=raw_input();i=l=len(c)
 while i:
\x09j=0
\x09while j<=l-i:
\x09 C=c[j:j+i];j+=1
\x09 if C==C[::-1]:print C;i=1;j=l
\x09i-=1

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page