Search code examples
pythoncdictionaryhashtable

What's the difference between a hash table and a Python dictionary?


I am starting to learn about the hash table data structure in C, and I've noticed (if I understand the concept correctly) that hash tables are awfully similar to python dictionaries. If I am incorrect and they are two completely different things, could someone explain to me what a hash table is without getting too technical? Thanks.


Solution

  • There is not really any difference between them. That's why python's dicts don't support duplicates. That is also why python has the function hash which python's dictionaries use by default.