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

统计大写字母个数

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

相关推荐

投递阿里巴巴控股集团等公司7个岗位 >
点赞 评论 收藏
转发
2 1 评论
分享
牛客网
牛客企业服务