sort a dictionary by keys in specific order

spohle spohle at
Fri May 26 19:26:44 CEST 2006

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

dic = {'key1':'value1', 'key2':'value2', 'key3':'value3'}

list = [key2, key3, key1]

More information about the Python-list mailing list