n largest files in a directory
You could replace your function with:

file_names = (os.path.join(path, name) for path, _, filenames in os.walk(directory)
        for name in filenames)

file_sizes = ((name, os.path.getsize(name)) for name in file_names)


However, I'm not sure that really helps the clarity.

I found doing this:

big_files = heapq.nlargest(
        num_files, file_names, key=os.path.getsize)
print(*("{}\t{:&gt;}".format(b, os.path.getsize(b)) for b in big_files))


Actually runs slightly quicker then your version.