Q:

hash tables in python

I started learning hash tables, so could anybody explain how the programm works. Although, where should I write a list with values?
The code is here:
http://www.daniweb.com/software-development/python/threads/342511

A:

What you are looking at is an implementation of Hash Tables with chaining.
The purpose of this is to avoid hash collisions by creating a chain of values in which their hash values are the same.
The general implementation is that the key contains a pointer to a linked list. When you want to insert a value, you add your new element to the linked list where the hash value is the key of that linked list.
You can read more about this here:
http://en.wikipedia.org/wiki/Hash_table#Separate_chaining

