<doocs>0520.Detect Capital_1.py
def detectCapitalUse( word: str) -> bool:
    cnt = 0
    for c in word:
        if c.isupper():
            cnt += 1
    return cnt == 0 or cnt == len(word) or (cnt == 1 and word[0].isupper())
def sample_funcname ( var_0 : str ) -> bool :
    var_4 = 0
    for var_5 in var_0 :
        if var_5.isupper ( ) :
            var_4 += 1
    return var_4 == 0 or var_4 == len ( var_0 ) or ( var_4 == 1 and var_0 [ 0 ].isupper ( ) )
