there we still get the same hash value for two different strings as we have said beforethis doesn' have to be problembut we need to devise strategy for resolving collisions we shall look at that shortlybut first we will study an implementation of hash table hash table hash table is form of list where elements are accessed by keyword rather than an index number at leastthis is how the client code will see it internallyit will use slightly modified version of our hashing function in order to find the index position in which the element should be inserted this gives us fast lookupssince we are using an index number which corresponds to the hash value of the key we start by creating class to hold hash table items these need to have key and valuesince our hash table is key-value storeclass hashitemdef __init__(selfkeyvalue)self key key self value value this gives us very simple way to store items nextwe start working on the hash table class itself as usualwe start off with constructorclass hashtabledef __init__(self)self size self slots [none for in range(self size)self count the hash table uses standard python list to store its elements we could equally well have used the linked list that we developed previouslybut right now our focus is on understanding the hash tableso we shall use what is at our disposal we set the size of the hash table to elements to start with laterwe will look at strategies for how to grow the table as we begin filling it up we now initialize list containing elements these elements are often referred to as slots or buckets finallywe add counter for the number of actual hash table elements we have