Palindrome¶
🎯 Write a function that checks whether a string is a palindrome:
def is_palindrome(s):
...
Tests¶
Test your function with this code:
assert is_palindrome('Abba')
assert is_palindrome('kayak')
assert is_palindrome('Rats live on no evil star')
assert not is_palindrome('abc')
assert not is_palindrome('Hello world')
Hints¶
remove whitespace
ignore punctuation marks
ignore upper/lower case
you find more palindromes on Wikipedia.
Translated with www.DeepL.com