Task:
Write a function that checks if a given string (case insensitive) is a palindrome.
Solution:
def is_palindrome(s):
return s.lower() == s[::-1].lower()
print(is_palindrome('Aba'))
Is it a palindrome? Solutions | Codewars
Write a function that checks if a given string (case insensitive) is a palindrome.
def is_palindrome(s):
return s.lower() == s[::-1].lower()
print(is_palindrome('Aba'))
Is it a palindrome? Solutions | Codewars
No comments :
Post a Comment