题解 | #密码截取#
密码截取
https://www.nowcoder.com/practice/3cd4621963e8454594f00199f4536bb1
s = input() l = [] res = [] n = len(s) for i in range(n-1): for j in range(1,n): if s[i] == s[j] and s[i:j+1] == s[i:j+1][::-1]: l.append(len(s[i:j+1])) print(max(l))