Monday, February 21, 2022

Is Palindrome Python Codewars

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



Related Posts


No comments :

Post a Comment