be stored as string of zeroes and ones since computers speak binary these zeroes and ones can be interpreted however we likeincluding as the index into list this concept is so important that python (and many other modern languageshas included function called hash that can be called on any object to return an integer value for an object we'll call this value the object' hash code or hash value consider these calls to the hash function python ( : feb : : [gcc (apple inc build )on darwin type "help""copyright""creditsor "licensefor more information hash("abc"- hash(" " hash( hash( hash( hash(true hash(false hash([ , , ]traceback (most recent call last)file ""line in typeerrorunhashable type'listwhile most objects are hashablenot every object is in particularmutable objects like lists may not be hashable because when an object is mutated its hash value may also change this has consequences when using hash values in data structures as we'll see later in this in addition to built-in typespython let' the programmer have some control over hash codes by implementing __hash__ method on class if you write __hash__ method for class you can return whatever hash value integer you like for instances of that class notice that calling hash on the string "abcreturned negative value while other calls to hash returned extremely large integers clearly some work has to be done to convert this hash integer into an acceptable index into list read on to discover how hash values are converted into list indices the hashset class we can use hash value to compute an index into list to obtain ( item lookup complexity to hide the details of the list and the calling of the hash function to find the index of the itema set class can be written we'll call our set class hashsetnot to be confused with the built-in set class of python the built-in set class uses hashingtoo the hashset class presented in this section shows you how the set this copy belongs to 'acha