to check if folder is not empty in python code example
Example: python check if folder is empty
if not os.listdir('/home/varun/temp') :
print("Directory /home/varun/temp is empty")
if not os.listdir('/home/varun/temp') :
print("Directory /home/varun/temp is empty")