求输入的字符串(zfc=('the' , 'Wu' , 'eru' , 'Why'))中首字母大写的单词的个数。

求输入的字符串(zfc=('the' , 'Wu' , 'eru' , 'Why'))中首字母大写的单词的个数。

# encoding: utf-8
import re
zfc=['the' , 'Wu' , 'eru' , 'Why']
result = len(list(filter(lambda(x): re.match(r'[A-Z].*', x) , zfc)))
print(result)
2