From 8059ab546d3dd046f98a2090f543f62b96b96e4b Mon Sep 17 00:00:00 2001 From: Deven <63876261+devenperez@users.noreply.github.com> Date: Tue, 9 Sep 2025 15:07:45 -0400 Subject: [PATCH] Time: 0 ms (100%), Space: 12.4 MB (81.14%) - LeetHub --- 0520-detect-capital/0520-detect-capital.py | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 0520-detect-capital/0520-detect-capital.py diff --git a/0520-detect-capital/0520-detect-capital.py b/0520-detect-capital/0520-detect-capital.py new file mode 100644 index 0000000..9fddec9 --- /dev/null +++ b/0520-detect-capital/0520-detect-capital.py @@ -0,0 +1,7 @@ +class Solution(object): + def detectCapitalUse(self, word): + """ + :type word: str + :rtype: bool + """ + return word[1:] == word[1:].lower() or word == word.upper() \ No newline at end of file