how to check if file is empty in python code example
Example: python check if a file is empty
import os
if os.stat("yourfile.extension").st_size == 0:
#note: file has to be in same directory as python script#
print('empty')
import os
if os.stat("yourfile.extension").st_size == 0:
#note: file has to be in same directory as python script#
print('empty')