On Mar 19, 2:40 am, grbgooglefan <[EMAIL PROTECTED]> wrote:
> Hi,
> I have a situation that I need to search a name in a big list of names
> in my Python embedded interpreter. I am planning to use hash map for
> quicker search.
> How do I create hash map in Python?
> Can you please guide me to some documentation or tutorial which
> provides information on creating, editing, searching through hash map
> in Python?
> Thanks.

#creating:
my_dict = {'a':1, 'b':2, 'c':3}

#editing:
my_dict['a'] = 10

#searching:
result = my_dict.get('a', None)
print result  //10

result = my_dict.get('f', None)
print result  //None
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to