Why searching in a set is much faster than in a list ?
Marko Rauhamaa
marko at pacujo.net
Wed Sep 28 04:46:56 EDT 2016
Lawrence D’Oliveiro <lawrencedo99 at gmail.com>:
> On Wednesday, September 28, 2016 at 6:51:17 PM UTC+13, ast wrote:
>> I noticed that searching in a set is faster than searching in a list.
>
> That’s why we have sets.
I would have thought the point of sets is to have set semantics, just
like the point of lists is to have list semantics.
Marko
More information about the Python-list
mailing list