I am required to use multiple hashtables, so in c++, I would normally use an std::unordered_map. So far I can understand that I can use a dictionary in Python, so let\'s assume
A simple Python shell experiment to show that different dictionaries can use the same key:
>>> my_dict_1 = {'foo':1}
>>> my_dict_2 = {'foo':2}
>>> my_dict_1,my_dict_2
({'foo': 1}, {'foo': 2})
This is a good discussion of how it is implemented. The key point is that each dictionary is allocated its own portion of memory (which can of course grow as needed). The exact same hash function is used for both dictionaries, but is being used to probe different areas in memory.