Arshad Mehmood

Search the blog

    Today I Learned

    Check if a string is a palindrome

    python

    Slicing is the way to go.

    def isPalindrome(s): 
        return s == s[::-1]