0 votes
in Python by
Write a program to count the number of capital letters in a file?

1 Answer

0 votes
by

1

2

3

4

5

6

with open(SOME_LARGE_FILE) as countletter:

count = 0

text = countletter.read()

for character in text:

if character.isupper():

count += 1

Related questions

0 votes
asked May 17, 2020 in Python by sharadyadav1986
0 votes
asked May 17, 2020 in Python by sharadyadav1986
...