Time: 38 ms (17.10%), Space: 13.5 MB (63.60%) - LeetHub

This commit is contained in:
Deven
2023-01-02 23:20:42 -05:00
parent 261c4bef78
commit 1b6a671363
+13
View File
@@ -0,0 +1,13 @@
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