Back
I have a text file.
How can I check whether it's empty or not?
>>> import os >>> os.stat("file").st_size == 0 True
>>> import os
>>> os.stat("file").st_size == 0
True
31k questions
32.8k answers
501 comments
693 users