• Bug in task

 

I would like to give some feedback about ...

From: https://checkio.org/mission/the-longest-palindromic/solve/

def longest_palindromic(text): l = [] k = [] s = 0 for item in text: if text.count(item) >= 1: l.append(item) s = text.count(item)
for smth in l: k.append(len(smth)) k.append(smth) for item in k[::2]: if item == max(k[::2]): return k[k.index(item) + 1]

Test 2 has wrong result, 'aba' is not palindromic sequence.