title: Python dynamic dictionary creation
body: <p>I am new to python started few days back. Can anyone help me achieve following objective?</p>
  
  <p>I have two lists -</p>
  
  <pre><code>mylist1 = ["Country", "State", "City", "Name", "Age"]
  </code></pre>
  
  <p>The another list -</p>
  
  <pre><code>mylist2 = [["India", "Maharashtra", "Mumbai", "Tom", 30],
             ["India", "Maharashtra", "Mumbai", "John", 40],
             ["India", "Maharashtra", "Pune", "Ronny", 25]
             ["India", "Madhya Pradesh", "Indore", "Jade", 35]]
  </code></pre>
  
  <p>The user will the level of dictionary e.g.</p>
  
  <pre><code>level = 4
  </code></pre>
  
  <p>So dictionary of depth 3 should be created as given below -</p>
  
  <pre><code>mydict = {"India":{"Maharashtra":{"Mumbai":{"Tom":{"Age":30},"John":{"Age":40}},
                                    "Pune"  :{"Ronny":{"Age":25}},
                     "Madhya Pradesh":{"Indore": {"Jade": {"Age" : 35}}}
                 }
  </code></pre>
  
  <p>There could be some typos in above dictionary. I haven't tried anything to get this working. </p>
  
  <p>Also note that, the above lists can be changed as follow -</p>
  
  <pre><code>mylist1 = ["State", "City", "Name", "Age"]
  </code></pre>
  
  <p>The another list -</p>
  
  <pre><code>mylist2 = [["Maharashtra", "Mumbai", "Tom", 30],
             ["Maharashtra", "Mumbai", "John", 40],
             ["Maharashtra", "Pune", "Ronny", 25]
             ["Madhya Pradesh", "Indore", "Jade", 35]]
  </code></pre>
  
  <p>Hence user may provide level = 3 in above case.</p>