python 思路其实很简单,关键是注意格式,空格写错了,调试了一会
统计大写字母个数
http://www.nowcoder.com/questionTerminal/434414efe5ea48e5b06ebf2b35434a9c
encoding: utf-8
import sys
if name == 'main':
while True:
try:
s = raw_input()
i=0
sum =0
num = 0
while i < len(s):
# num= s[i]-'A'
# print num
if s[i]>='A' and s[i]<='Z':
sum = sum+1
i=i+1
print sum
except:
break