520-Detect-Capital
Sat 17 May 2025
https://leetcode.com/problems/detect-capital
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def detectCapitalUse(self, word: str) -> bool:
return word.isupper() or word.islower() or word.istitle()
new Solution().detectCapitalUse()
Score: 5
Category: leetcode