KraftDiner wrote: > The dictionary is sorted by the point key. > Is there a way to sort the dictionary by the value? > Seems to me this goes against the purpose of a dictionary but.... > thats what I need to do.. >
Well, it's probably not all that efficient, but it is simple code: sortedList = [(v, k) for k, v in self.histo.items()] sortedList.sort() Should do it... -Kirk McDonald -- http://mail.python.org/mailman/listinfo/python-list