Easy Python If Statement

  • 0

    Could use an or to condense this, but just to be 100% clear about what is going on:

            if word == word.lower():
                return True
            elif word == word.upper():
                return True
            elif word == word.title():
                return True
                return False

Log in to reply

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