Python dict是一个非常有用的数据结构:
dict
d = {'a': 1, 'b': 2} d['a'] # get 1
有时你也想按值索引.
d[1] # get 'a'
哪种方法是实现此数据结构的最有效方法?有官方推荐的方法吗?
python hashtable bidirectional
bidirectional ×1
hashtable ×1
python ×1