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

统计大写字母个数

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

while True:
    try:
        import re
        s=input()
        pattern=r'[A-Z]'
        NEW=re.findall(pattern, s)
        new=''.join(NEW)
        print(len(new))
    except:
        break
全部评论
一句话的事 print(len(''.join(re.findall('[A-Z]', input()))))
1 回复 分享
发布于 2022-05-01 19:37

相关推荐

10-14 12:20
门头沟学院 Java
迷茫的大四🐶:摊牌了,我是25届的,你们也不招我
点赞 评论 收藏
分享
10-10 11:38
已编辑
湖南理工大学 Java
小浪_Coding:多沟通叭, 公式简历+学历一般的话难找
点赞 评论 收藏
分享
评论
1
收藏
分享

创作者周榜

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