Files
leetcode/0520-detect-capital/0520-detect-capital.py
T

7 lines
198 B
Python

class Solution(object):
def detectCapitalUse(self, word):
"""
:type word: str
:rtype: bool
"""
return word[1:] == word[1:].lower() or word == word.upper()