# -*- coding:utf-8 -*- class Palindrome: def getstr(self,A,n): re = [] for i in range(n): for j in range(i + 1,n + 1): re.append(A[i:j]) return re def choose(self,A,n): tmp = [] for k in self.getstr(A,n): if k =...