mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-15 09:57:09 +00:00
Time: 38 ms (17.10%), Space: 13.5 MB (63.60%) - LeetHub
This commit is contained in:
@@ -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
|
||||||
Reference in New Issue
Block a user