统计输入字符串中大写字母的个数
遍历整个字符串,记录大写字母的个数
input_str = input() count = 0 for i in input_str: if i >= "A" and i <= "Z": count += 1 print(count)