注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号
x
本帖最后由 codedayday 于 2020-8-2 07:35 编辑
大周末的,轻松一下,周云鹏帮我解的一道python算法题:
https://leetcode.com/problems/de ... olution-for-3-cases
[Python] 纯文本查看 复制代码
The funny part(beauty) of python is handy API, which can really make you easily meet 'Just do it' dream cherished by HomeDepot
class Solution:
def detectCapitalUse(self, word: str) -> bool:
return word.isupper() or word.islower() or word.istitle() # case 1, 2, and 3
#In case you can read chinese, here is one more bonus point. 周云鹏小品《喜剧这点事儿干就完了》
喜欢的麻烦点赞啊:)
|