Longest palindromic substrings: Difference between revisions
Content added Content deleted
Line 324: | Line 324: | ||
]) if palindromes else 1 |
]) if palindromes else 1 |
||
return ( |
return ( |
||
[ |
|||
x for x in palindromes if maxLength == len(x) |
|||
] if palindromes else list(s), |
|||
) if 1 < maxLength else list(s)), |
|||
maxLength |
maxLength |
||
) |
) |