Python 3 Script to Count Capital Letters in a Text File Full Project For Beginners

 

 

app.py

 

 

with open("text.txt") as file:
    count = 0
    text = file.read()
    for i in text:
        if i.isupper():
            count += 1
    print(count)

Leave a Reply