title: Recursively convert (label, list) pairs to a dictionary
body: <p>I have a data-structure currently in the format of nested strings and lists corresponding to said strings, for example:</p>
  
  <pre><code>'Document types'
  ['Surveys and overviews', 'Reference works', 'General conference proceedings', 'Biographies', 'General literature', 'Computing standards, RFCs and guidelines']
  'Cross-computing tools and techniques
  ['Reliability', 'Empirical studies', 'Measurement', 'Metrics', 'Evaluation', 'Experimentation', 'Estimation', 'Design', 'Performance', 'Validation', 'Verification']
  </code></pre>
  
  <p>where each list may be a list of strings (i.e. the base case and deepest level), or another series of label-list pairs.</p>
  
  <p>I've developed code to convert the top-most layer, but cannot find a way to have it iteratively or recursively perform the action on the layer below.</p>
  
  <p>My code so far:     </p>
  
  <pre><code>  def recursive(self, data):
      for label, tags in zip(*[iter(data)]*2):
        self.newData[label] = tags
  
      return self.newData
  </code></pre>
  
  <p>Example input structure:
  <a href="https://i.stack.imgur.com/0MCr4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0MCr4.png" alt="enter image description here"></a></p>