求回文子字符串,如:在ABCDDCBAXz中,DD、CDDC、BCDDCB、ABCDDCBA均为回文子字符串。下 面Python代码是其实现,横线处应填入的代码是( )。
1 srcStr = input() 2 3 symList = [] #保存回文子字符串 4 for i in range(len(srcStr)): 5 for j in range(i + 2, len(srcStr) + 1): 6 subStr = ___________ 7 if subStr == _____________: 8 symList.append(subStr) 9 10 for i in sorted(symList, key = lambda x: len(x)): 11 print(i)