A dictionary (or hash table) has an index that directly translates where in the computer's memory the value for the key-value pair can be found. So no matter how large the dictionary is, finding any item always takes the same amount of time.

But for a list, Python must start at the beginning of the list and then move through the list until it finds an item it is searching for. If the list is very large, then this means there is a very large number of items Python must search through.

This is why 'foo' in someDictVariable is a lot faster than 'foo' in someListVariable, even if both the dictionary and list are very large.