Paul Tremblay wrote: >Is there a way to sort a dictionary by values? > You can do this: >>> x = { 'file1':10000, 'file2':10000, 'file3':5000 } >>> y = x.keys() >>> y.sort() >>> for key in y: print str(key)+", "+ str(x[key]) file1, 10000 file2, 10000 file3, 5000 It's not pretty, but it works.