Have a piece of code in python :
print (sorted([(r,len(f)) for r,d,f in os.walk(directory_path)],key=lambda x : x[1],reverse = True))
which gives output like :
[('/etc/ssl/certs', 595), ('/etc/alternatives', 109), ('/etc/', 73), ('/etc/init.d', 52),('/etc/dovecot/conf.d', 27)]
I want something like (without storing it to a variable):
('/etc/ssl/certs', 595)
('/etc/alternatives', 109)
('/etc/', 73)
('/etc/init.d', 52)
('/etc/dovecot/conf.d', 27)]