Python list of lists conversion into dictionary
<p>I'm trying to convert a list of lists into dictionary, but I'm getting troubles. Would anyone give some tips ?</p>

<p>This my input:</p>

<pre><code>[['Column1', 'Column2', 'Column3', 'Column4', 'Column5'],     
['Value1Column1', 'Value1Column2', 'Value1Column3', 'Value1Column4',   
'Value1Column5'], ['Value2Column1', 'Value2Column2', 'Value2Column3', 
'Value2Column4', 'Value2Column5'], ..., 
['ValueXColumn1','ValueXColumn2', 'ValueXColumn3', 'ValueXColumn4', 'ValueXColumn5']]
</code></pre>

<p>Having this I would like to create a dictionary, where my keys would be <strong>only</strong> elements from 1st list which are <strong>Column1, Column2...Column5</strong>. </p>

<p>It's also known that for each key exact value is element from the rest of lists: </p>

<p>Column1 --> Value1Column1, Value2Column1...</p>

<p>Column2 --> Value1Column2, Value2Column2...</p>

<p><strong>Expected result:<br></strong></p>

<pre><code>"Column1": ["Value1Column1", "Value2Column1"...]
</code></pre>

<p>I've been trying with zip, enumurate (maybe wrongly used) and got always unexpected output. Thanks!</p>

<pre><code>a = [['Column1', 'Column2', 'Column3', 'Column4', 'Column5'], ['Value1Column1', 'Value1Column2', 'Value1Column3', 'Value1Column4', 'Value1Column5'], ['Value2Column1', 'Value2Column2', 'Value2Column3', 'Value2Column4', 'Value2Column5']]

[{a[0][i]: [j[i] for j in a[1:]] for i in range(len(a[0]))}]
</code></pre>

<p>gives</p>

<pre><code>[{'Column1': ['Value1Column1', 'Value2Column1'],
  'Column2': ['Value1Column2', 'Value2Column2'],
  'Column3': ['Value1Column3', 'Value2Column3'],
  'Column4': ['Value1Column4', 'Value2Column4'],
  'Column5': ['Value1Column5', 'Value2Column5']}]
</code></pre>

python dictionary data-type-conversion