Question: Please write a Python function named countCharacter ( filename ) that accepts the name of a text file as an input, reads the contents of
Please write a Python function named countCharacter filename that accepts the name of a text file as an input, reads the contents of the file, and returns a dictionary containing the following information:
The number of uppercase letters in the file.
The number of lowercase letters in the file.
The number of digits in the file.
The number of whitespace characters in the file.
Start coding or generate with AI
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
