I was watching a video on Hash Table, and the professor clearly said:

Now suppose I am using Python to add million values into my hash table.
Code:
dictionary = {}
for i in xrange(1000000):
dictionary[i] = ''
dictionary = {}
for i in ['A', 'B', 1, 2, 3, 4, 1, 'Hi']:
dictionary[i] = ''
How do you calculate a hash function here? Since you are constantly adding elements into the dictionary, does the hash function continuously change based on total number of elements? Or The hash function is decided once before inserting all the elements?
Since my program doesn't know what all values might come in the dictionary, how do we decide the hash function here? My list of values can be anything here not just numbers.
unique keyfor each value in my list.