题解 | 统计大写字母个数
def search_upper(n): sum_upper = 0 for i in n: if i.isupper(): sum_upper += 1 return sum_upper n = input().strip() print(search_upper(n))
def search_upper(n): sum_upper = 0 for i in n: if i.isupper(): sum_upper += 1 return sum_upper n = input().strip() print(search_upper(n))
相关推荐