fork download
  1. def czy_palindrom(s):
  2. for i in range(len(s) // 2):
  3. if s[i] != s[-i - 1]:
  4. return False
  5. return True
  6. print(czy_palindrom("aabbaa"))
  7. print(czy_palindrom("aaxyaa"))
Success #stdin #stdout 0.07s 14148KB
stdin
Standard input is empty
stdout
True
False