import sys import string big = set(string.ascii_uppercase) a = input() res = 0 for _ in a: if _ in big: res += 1 print(res)
利用string的字符集特点