Python: With built-in functions only


  • 0
    P

    def detectCapitalUse(self, word):
    return word.upper() == word or word.lower() == word or word.capitalize() == word


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.