title: Creating a nested dictionary python
body: <p>Probably an example will be easier to explain this.</p>
  
  <p>So imagine i have something  like this:</p>
  
  <pre><code> word_dict = {"word": frequency}
  </code></pre>
  
  <p>example would I loop thru a paragraph and in that paragraph I found the word freq as</p>
  
  <pre><code> word_dict = {"this":2,"that":4} # assume that all the cases have just these two words..
  </code></pre>
  
  <p>yepp its a strange dict..</p>
  
  <p>Now, each paragraph is assigned to a story and this story has an id:</p>
  
  <p>lets say i get this:</p>
  
  <pre><code>{1234: {word_dict}} # where 1234 is the story id
  </code></pre>
  
  <p>and then this story is contanined in a book:
  So if do something like <code>book_dict[book_id][story_id]</code>, this would return me word_dict.</p>
  
  <p>But there is a good chance that a same book_id, story_id will have different word_dict</p>
  
  <p>i Know it sounds weird.. </p>
  
  <p>So what I want is that <code>book_dict[book_id][story_id] = [{word_dict}]</code> so it returns me a list of word dictionary..</p>
  
  <p>How do I implement this.</p>
  
  <p>Err. is the question making any sense?</p>