For example, we have some file like that:
first line second line third line
And in result we have to get:
Use ONLY python
import fileinput for line in fileinput.FileInput("file",inplace=1): if line.rstrip(): print line
1.4m articles
1.4m replys
5 comments
57.0k users