I saw an example of code that where hash function is applied to a tuple. As a result it returns a negative integer. I wonder what does this function do? Google
You can use the Dictionary data type in python. It's very very similar to the hash—and it also supports nesting, similar to the to nested hash.
Example:
dict = {'Name': 'Zara', 'Age': 7, 'Class': 'First'}
dict['Age'] = 8; # update existing entry
dict['School'] = "DPS School" # Add new entry
print ("dict['Age']: ", dict['Age'])
print ("dict['School']: ", dict['School'])
For more information, please reference this tutorial on the dictionary data type.