+ 1

Python uppercase lowercase count function!

Hello everyone, how do you make a function that calculate number of lowercase and uppercase from a file? I have done it using string but it won't work from a file! Anyone can help?

14th Jul 2020, 10:39 AM
Mohamed Hadji
Mohamed Hadji - avatar
5 odpowiedzi
+ 3
If you file is not a binary file, it is exactly the same. You simply replace the input string by the file content. (open and read file)
14th Jul 2020, 10:45 AM
Théophile
Théophile - avatar
+ 1
Mohamed Hadji In your description, you said lower and uppercase. Check if this works. https://code.sololearn.com/c7zr56C3SN8S/?ref=app
14th Jul 2020, 12:13 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
the code is long but this is what iam trying to do https://code.sololearn.com/cAG3spwZn8su/?ref=app
14th Jul 2020, 11:04 AM
Mohamed Hadji
Mohamed Hadji - avatar
0
Mohamed Hadji are you trying to count the number of lower and uppercase characters in the file?
14th Jul 2020, 12:04 PM
Tomiwa Joseph
Tomiwa Joseph - avatar
0
i got the answer! i had to creat a loop withing a loop to got it to work! thanks everyone!
14th Jul 2020, 3:09 PM
Mohamed Hadji
Mohamed Hadji - avatar