_覓 | 覦覈襦 | 豕蠏手 | 殊螳 | 譯殊碁 |
FrontPage › HashTable企願鍵
|
|
螳 襴螳 .
dic = {'a':1, 'b':2, 'c':3, 'd':3, 'e':3, 1:1} る 蟆蠍磯 暑.
dic['a'] 螳 企り? 襴 螳 3 るれ 蟆企瓦.
p = 3 search = [] for k in dic: if(dic[k] == p): search.append(k) print(search) 蟆郁骸
['d', 'c', 'e'] 襷 襴襯 螻 企一朱 蟆伎 る 企 觜 殊 .
螳 朱 蟆る 蟆蠍 麹 襭蟲譟一 . れ 螳 覦蠑 伎 企 朱 螳 蟆 襴襯 螻 れ讌 螻 朱覿襷 蟆 麹 焔レ 蠍磯 蟆 螳. 螳 蟲 覺る. (襷 殊企襴襯 谿場覲企 蟆企. 螻給 谿 企瓦) hash_table = {} for k, v in dic.items(): if(v not in hash_table): hash_table[v] = [] hash_table[v].append([k]) print(hash_table) 蟆郁骸
{1: [[1], ['a']], 2: [['b']], 3: [['d'], ['c'], ['e']]}
鏤
|
譴 蟆 讌蠍 覦朱 螳螻 り 覩遂 蟆企. (一企 觜れ洲) |