How to check whether a file is empty or not

>>> import os
>>> os.stat("file").st_size == 0
True

Leave a Comment