Return True if the given word is a palindrome.
(word)
| 49 | |
| 50 | print("Example 1") |
| 51 | def palindrome(word): |
| 52 | """Return True if the given word is a palindrome.""" |
| 53 | return word == word[::-1] |
| 54 | |
| 55 | assert palindrome("tacocat") |
| 56 | assert not palindrome("banana") |