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
2.1m questions
2.1m answers
60 comments
57.0k users