title: What's the most efficient way to zip two nested list to a single level dictionary
body: <p>for example:</p>
  
  <pre class="lang-py prettyprint-override"><code>list1=['k1','k2','k3',['k4','k5',['k6','k7']]]
  list2=['v1','v2','v3',['v4','v5',['v6','v7']]]
  </code></pre>
  
  <p>and I want to merge them to a dictionary like this:</p>
  
  <pre class="lang-py prettyprint-override"><code>dict1={'k1':'v1','k2':'v2','k3':'v3','k4':'v4','k5':'v5','k6':'v6','k7':'v7'}
  </code></pre>
  
  <p>I have a way to do this, but I think it takes too much time:</p>
  
  <pre class="lang-py prettyprint-override"><code>def mergeToDict(keyList, valueList):
      resultDict = {}
      for key, value in itertools.izip(keyList, valueList):
          if type(key) == list and type(value) == list:
              resultDict=dict(resultDict,**mergeToDict(key, value))
          elif type(key) != list and type(key) != dict and type(key) != tuple:
              resultDict[key] = value
      return resultDict
  </code></pre>
  
  <p>Is there any better ideas?</p>