That one's easy to answer: the latter! The former would do a linear
search in the list, while the latter uses hashing to quickly find an
item in a dictionary of any size.
In other words: lists are optimized for access by index, dictionaries
for access by key value...
Cheers (and glad for asking an easy yet new question :-)
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
<URL:http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>