0
I am given an text file...I have to write a progr thay reads above file and displays names of females and count of males and fem
please help with python
4 Réponses
+ 3
Module 4 in the course teaches you how to read files. To say anything more to your question I'd need to know how exactly the data in your file is formatted.
+ 3
In that case I'd recommend to iterate over the file object with a for loop (that will give you the contents line by line) and use the split and strip methods of strings.
0
Helen Simpton - M
Todd Clever - F
thats the format of the names in the file