删除空文件夹

import os
for root, dirs, files in os.walk(top, topdown=False):
	for name in dirs:
		try:
			os.rmdir(os.path.join(root, name))
		except:
			pass

编程技巧