Search of Dictionary Keys python

前端 未结 6 1424
被撕碎了的回忆
被撕碎了的回忆 2021-02-20 11:46

I want to know how I could perform some kind of index on keys from a python dictionary. The dictionary holds approx. 400,000 items, so I am trying to avoid a linear search.

6条回答
  •  不知归路
    2021-02-20 11:47

    Perhaps using has_key solve this too.

    http://docs.python.org/release/2.5.2/lib/typesmapping.html

提交回复
热议问题