def czyPalindrom1(napis):
return napis == napis[::-1]
def czyPalindrom2(napis):
for i in range(len(napis)):
if napis[i] != napis[-i-1]:
return False
return True
ZGVmIGN6eVBhbGluZHJvbTEobmFwaXMpOgoJcmV0dXJuIG5hcGlzID09IG5hcGlzWzo6LTFdCgpkZWYgY3p5UGFsaW5kcm9tMihuYXBpcyk6Cglmb3IgaSBpbiByYW5nZShsZW4obmFwaXMpKToKCQlpZiBuYXBpc1tpXSAhPSBuYXBpc1staS0xXToKCQkJcmV0dXJuIEZhbHNlCglyZXR1cm4gVHJ1ZQoK