Read Lines From Text File
Write a method/function COUNTLINES_ET() in python to read lines from a text file REPORT.TXT and COUNT those lines which are starting either with ‘E’ or starting with ‘T’ and display the Total count separately.
For example:
If REPORT.TXT consists of
“ENTRY LEVEL OF PROGRAMMING CAN BE LEARNED FROM PYTHON.
ALSO, IT IS VERY FLEXIBLE LANGUGAE.
THIS WILL BE USEFUL FOR VARIETY OF USERS.”
Then, Output will be:
No. of Lines with E: 1
No. of Lines with T: 1
#education #computerscience #tutorial #computers #python #pythonprogramming #pythontutorial #pythonforbeginners #pythonbeginner