Programs can interact with files and data using the concept of file handling.
File Handling in Python is reading and writing data from files.
We will first read characters from the file and then character check whether it is uppercase (using isupper() method ) or lowercase (using islower() method ) and count its respective number and print the count.
Program to read data from files and count uppercase and lowercase character
File : File.dat
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer