- 字典根据健读取
dic = {}
dic.get('key_a') #None
- 根据字典健排序
dic = max(dic, key=dic.get)
- list元素转换为int类型找最大值
max(lis, key=lambda x:int(x))
- 创建健为某个列表元素,值为列表的字典
tmp = [1,2,3]
ind = dict(zip(tmp,[[]]*len(tmp))) #{1:[],2:[],3:[]}
dic = {}
dic.get('key_a') #None
dic = max(dic, key=dic.get)
max(lis, key=lambda x:int(x))
tmp = [1,2,3]
ind = dict(zip(tmp,[[]]*len(tmp))) #{1:[],2:[],3:[]}