Python: hash table?

  • datulaida / 206 / Fri, 27 Mar 2009 04:33:00 GMT / Comments (3)
  • how to build hash table in python?
    any suggestion?
    thanks..
  • Keywords:

    hash, table, python

  • http://programming.itags.org/python/32367/«« Last Thread - Next Thread »»
    1. Quote:Originally Posted by datulaidahow to build hash table in python?
      any suggestion?
      thanks..The Python equivalent of a hash table is a dictionary. Example:
      Code: ( python )

      1. >>> dd = {'a': 1, 'b': 2, 'c': 3}
      2. >>> dd['a']
      3. 1
      4. >>>

      bvdet | Fri, 04 Jan 2008 23:36:00 GMT |

    2. Quote:Originally Posted by bvdetThe Python equivalent of a hash table is a dictionary. Example:
      Code: ( python )

      1. >>> dd = {'a': 1, 'b': 2, 'c': 3}
      2. >>> dd['a']
      3. 1
      4. >>>

      thank you for your help.. but i want to build hash tables..

      datulaida | Fri, 04 Jan 2008 23:37:00 GMT |

    3. Quote:
      Originally Posted by datulaida
      thank you for your help.. but i want to build hash tables..
      From Python Essential Reference:
      Quote:
      Originally Posted by Python Essential Reference
      Dictionaries are the only built-in mapping type and are Python's version of a hash table or associative array.

      bvdet | Fri, 04 Jan 2008 23:38:00 GMT |