how to check whether a directory is empty or not 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")