def palindromic(sequence): """Return True if the sequence is the same thing in reverse.""" return not any(n != m for n, m in zip(sequence, reversed(sequence))) print(palindromic("ama")) print(palindromic("amar")) print(palindromic("anilina"))