title: How to create a nested dictionary from a list of lists
body: <p>I want to create a nested dictionary from a list of lists.</p>
  <p><strong>Input</strong>:</p>
  <pre><code>[[a, b, c], [1, 'a', 'x'], [2, 'b', 'y']]
  </code></pre>
  <p>The main dictionary must have index as keys. The first list has the items to pass as keys to the nested dictionaries, and the following lists have the items to pass as values:</p>
  <p><strong>Desired output</strong>:</p>
  <pre><code>{0: {a:1, b:'a', c:'x'},
   1: {a:2, b:'b', c:'y'}}
  </code></pre>
  <p>I tried the following code, but it doesn't return each item as a nested dictionary:</p>
  <pre><code>output = {a[0]: list(a[1:]) for a in zip(*rows)}
  </code></pre>
  <p>Any help will be appreciated. Thanks</p>