title: Multiple levels of keys and values in Python
body: <p>I wanted to know if the functionality i am trying to implement in python is possible.</p>
  
  <p>I have a global hash called Creatures. Creatures contain sub-hashes called mammals, amphibians, birds, insects.</p>
  
  <p>Mammals have sub-hashes called whales, elephants. Amphibians have sub-hashes called frogs, larvae. Birds have sub-hashes called Eagle, parakeet. Insects have sub-hashes called dragonfly, mosquito.  </p>
  
  <p>Again, Eagles have sub-hashes called male, female.</p>
  
  <p>I am counting the frequencies of all these creatures from a text file. For example, if the file is in below format:  </p>
  
  <pre><code>Birds   Eagle  Female
  Mammals whales Male
  Birds   Eagle  Female
  
  I should output Creatures[Birds[Eagle[Female]]] = 2
                  Creatures[mammals[Whales[Male]]] = 1  
  </code></pre>
  
  <p>Is it possible in Python? How can it be done? I am very new to Python and please help is much appreciated. I am comfortable with dictionaries only upto 1 level, i.e. key-> value. But here, there are multiple keys and multiple values. i am not sure how to proceed with this. I am using python 2.6. Thanks in advace!</p>