Looking up a dictionary _key_ by key?

Chris Angelico rosuav at gmail.com
Tue Jun 23 21:02:03 EDT 2015


On Wed, Jun 24, 2015 at 10:47 AM, Dan Stromberg <drsalists at gmail.com> wrote:
> Would I have to do an O(n) search to find my key?

Iterate over it - it's an iterable view in Py3 - and compare.

ChrisA



More information about the Python-list mailing list