I´m with problem in Dictionaries !

I would like to know if the dictionary can sort with a function that i give to then!
Because i need to have a dictionary sort by key !
For exemple :
dict  = {}
dict[50] = "fifty"
dict[129] = "a hundred twenty nine"
print dict
{129: "a hundred twenty nine", 50: "fifty"}
 
But i need dict sort :
{ 50: "fifty", 129: "a hundred twenty nine"}
 
How can i do this ?
 
Thanks,
Glauco Buzini da Costa Silva
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to