spohle wrote: > hi i have a normal dictionary with key and value pairs. now i wanna > sort by the keys BUT in a specific order i determine in a list !? any > ideas > > dic = {'key1':'value1', 'key2':'value2', 'key3':'value3'} > > list = [key2, key3, key1] >
You could use the seqdict package at http://home.arcor.de/wolfgang.grafen/Python/Modules/Modules.html Regards Wolfgang -- http://mail.python.org/mailman/listinfo/python-list