会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
长456风
2015年3月20日
python有序字典
摘要: dict = {'a':7,'b':3,'c':4,'d':1,'e':8,}print dictorder_dict = collections.OrderedDict()order_dict['a'] = 1order_dict['b'] = 2print order_dictprint o...
阅读全文
posted @ 2015-03-20 17:05 长456风
阅读(175)
评论(0)
推荐(0)
value是列表的字典排序
摘要: # -*- coding: utf-8 -*-def dict_test(): #构造Map并对其排序 attr_tul = list(['a','b','c']) one_tul = list([[3,4],[1,9],[2,5]]) one_dic = {} f...
阅读全文
posted @ 2015-03-20 14:26 长456风
阅读(223)
评论(0)
推荐(0)
构造Map并对其排序
摘要: #构造Map并对其排序attr_tul = ['a','b','c','d','e','f']one_tul = [1,3,2,5,8,4]one_dic = {}for i in range(len(attr_tul)): one_dic[attr_tul[i]] = one_tul[i...
阅读全文
posted @ 2015-03-20 12:58 长456风
阅读(119)
评论(0)
推荐(0)
导航
博客园
首页
新随笔
联系
订阅
管理
公告