I want to read one text file line by line and delete the line. So steps are like below.
- Read the line
- Delete the line
Repeat step 1 and 2 until the file is not empty
For example data in file is like below.
1,2,3,4,5
a,b,c,d,e
q,w,e,r,t
a,s,d,f,g
So, steps will be ... while Reading
Read 1,2,3,4,5
Delete 1,2,3,4,5
then next line
Read a,b,c,d,e
Delete a,b,c,d,e
..
..
and so on until the file is not empty.
I know Python well, but I am not able to do it.