mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 14:57:08 +00:00
13 lines
291 B
Python
13 lines
291 B
Python
class Solution(object):
|
|
def detectCapitalUse(self, word):
|
|
"""
|
|
:type word: str
|
|
:rtype: bool
|
|
"""
|
|
if word == word.upper():
|
|
return True
|
|
|
|
if word[1:] == word[1:].lower():
|
|
return True
|
|
|
|
return False |