Write a one-liner that will count the number of capital letters in a file.

Your code should work even if the file is too big to fit in memory.

Python-Interview-Questions-and-Answers(i2tutorials.com)

for i in string : (i.isupper()) : count = count + 1

where,

string is the input which is taken from the user.

isupper() is a function which checks whether the alphabet is uppercase or not.

Count is a variable which increments itself whenever it finds an upper case alphabet.