1if not os.listdir('/home/varun/temp') :
2 print("Directory /home/varun/temp is empty")
1'''
2 Check if a Directory is empty : Method 1
3'''
4if len(os.listdir('/home/varun/temp') ) == 0:
5 print("Directory is empty")
6else:
7 print("Directory is not empty")