题解 | #统计大写字母个数#

统计大写字母个数

http://www.nowcoder.com/practice/434414efe5ea48e5b06ebf2b35434a9c

while True:
    try:
        list = [i for i in input() if i.isupper()]
        print(len(list))
        
    except:
        break
两句话整明白了
全部评论
print(len([d for d in input() if d.isupper()])) 一句即可
点赞 回复 分享
发布于 2021-10-02 22:39

相关推荐

11-26 11:32
已编辑
好未来_go开发(实习员工)
不服输的咸鱼很聪明:还给打电话呀,我的没给我打电话呢
点赞 评论 收藏
分享
评论
2
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务