520. Detect Capital
class Solution(object):
def detectCapitalUse(self, word):
"""
:type word: str
:rtype: bool
"""
return word.istitle() or word.isupper() or word.islower()
这道题……放在python里面就是纯考string库的了= = 只超过了32%的人?WTF
好吧大家速度都差不多。
def detectCapitalUse(self, word):
"""
:type word: str
:rtype: bool
"""
return word.istitle() or word.isupper() or word.islower()
这道题……放在python里面就是纯考string库的了= = 只超过了32%的人?WTF
好吧大家速度都差不多。
评论
发表评论