title: Assign Nested Keys and Values in Dictionaries
body: <p>I need to assign nested values to a dictionary. I have simplified my question for ease of understanding:</p>
  
  <pre><code>Data = {}   
  day1 = 'March12'
  day2 = 'March14'
  e1 = 'experiment1'
  e2 = 'experiment2'
  
  Data[day1][e1] = 4 
  </code></pre>
  
  <p>But the <code>Data[day1][e1] = 4</code> command does not function (for the same reason as <code>test = {} ; test["foo"]["bar"] = 0</code>). Is there a workaround to do this?</p>
  
  <p>I tried to do things like:</p>
  
  <pre><code>me1 = {e1 : 4}
  me2 = {e2 : 5}
  Data = {day1 : me1}
  Data = {day2 : me2}
  </code></pre>
  
  <p>But I couldn't succeed; all the things I wrote have somehow overwritten the existing values or were not as I would like to have. I'm probably missing out something...</p>
  
  <p>Some additional notes: At the begininng don't have any info about the length of the dictionary, or how it exactly looks like. And instead of the value <code>4</code>, I assign an object as a value. I need to use such a structure (<code>Data[day1][e1]</code>) because I have to assign the objects to their keys inside a loop.</p>