value_dict = {"value24":"0.26",
"value65":"0.24",
"value89":"4.25",
"value12":"1.25",
"value1":"0.25",
"value67":"2.45",
"value2":"0.65",
"value556":"9.25",
"value1234":"0.15",
"value123":"0.95",
"value21":"0.25",
"value89":"0.28",
"value2":"0.29",
"value6":"0.75"}
print sorted(value_dict, key=lambda x:int(x[5:])+1)
print sorted(value_dict.items(), key=lambda key:int(key[0][5:]))
网友评论