Can A single hash tabble do the work done by 2 hash tables?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nikhiladt
    New Member
    • Mar 2007
    • 1

    Can A single hash tabble do the work done by 2 hash tables?

    Hi

    I am having a code in which I am using 2 hash tables for storing 2 values for a particular key on which i do some mathametical operation. Can i store the two values for a particualr key with using only 1 hash table???

    can anyone help me on that ASAP

    thanks
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Originally posted by nikhiladt
    Hi

    I am having a code in which I am using 2 hash tables for storing 2 values for a particular key on which i do some mathametical operation. Can i store the two values for a particualr key with using only 1 hash table???

    can anyone help me on that ASAP

    thanks
    A snippet of you code would be very helpful. Please read "REPLY GUIDELINES" to learn how to use CODE tags. Thanks for joining.

    Comment

    • bvdet
      Recognized Expert Specialist
      • Oct 2006
      • 2851

      #3
      Originally posted by nikhiladt
      Hi

      I am having a code in which I am using 2 hash tables for storing 2 values for a particular key on which i do some mathametical operation. Can i store the two values for a particualr key with using only 1 hash table???

      can anyone help me on that ASAP

      thanks
      A dictionary is the Python version of a hash table. Dictionaries can associate an object with each key. The object can be a single value, a list, tuple, set, another dictionary, etc. As you can see, there is no reason you must store two separate values with the same key in separate dictionaries. Check out this thread: http://www.thescripts.com/forum/thread618948.html

      Comment

      Working...