Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6661 > unrolled thread

Re: searching in list

Started byvino19 <vinograd19@gmail.com>
First post2011-05-30 06:50 -0700
Last post2011-05-31 00:48 +1000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Re: searching in list vino19 <vinograd19@gmail.com> - 2011-05-30 06:50 -0700
    Re: searching in list Chris Angelico <rosuav@gmail.com> - 2011-05-31 00:48 +1000

#6661 — Re: searching in list

Fromvino19 <vinograd19@gmail.com>
Date2011-05-30 06:50 -0700
SubjectRe: searching in list
Message-ID<81cbfee3-a0a6-4aa0-97e7-1073332ab6cf@glegroupsg2000goo.googlegroups.com>
Thanks.

It seems that dictionary is a sorted list of tuples, so the procedure of searching an element is quite quick.

[toc] | [next] | [standalone]


#6664

FromChris Angelico <rosuav@gmail.com>
Date2011-05-31 00:48 +1000
Message-ID<mailman.2268.1306766932.9059.python-list@python.org>
In reply to#6661
On Mon, May 30, 2011 at 11:50 PM, vino19 <vinograd19@gmail.com> wrote:
> Thanks.
>
> It seems that dictionary is a sorted list of tuples, so the procedure of searching an element is quite quick.

Not sorted - it's hashed, so it's even faster. Yep, sounds like a
dictionary is everything you want!

Chris Angelico

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web