converting lists to dictionaries
<p>I want to convert the data below into a dictionary with first column as Id number and rest of the elements as values</p>

<pre><code>EDF768, Bill Meyer, 2456, Vet_Parking

TY5678, Jane Miller, 8987, AgHort_Parking

GEF123, Jill Black, 3456, Creche_Parking
</code></pre>

<p>So far I have opened the file and converted the data into a list. But I am not able to convert it into dictionary as its stating that equence is too long.</p>

<pre><code>def createNameDict():
      file = open("C:\Users\user\Desktop\\ParkingData_Part2.txt","rt")
      contents = file.read()
      print contents,"\n"
      data_list = [line.split(",")  for line in contents.split("\n")]
      print data_list, "\n"
      dict_list = []
      data_dict = {}
      for line in data_list:
        key = line[0]
        value = (line[1], line[2], line[3])
        data_dict[key] = value
        data_dict = dict()

        dict_list.append(data_dict)
        # start dictionary over
        #print data_dict
      print (data_list)


      file.close()
</code></pre>

<p>The output I have is:</p>

<pre><code>[['EDF768', ' Bill Meyer', ' 2456', ' Vet_Parking'], 
['TY5678', ' Jane Miller', ' 8987', ' AgHort_Parking'], 
['GEF123', ' Jill Black', ' 3456', ' Creche_Parking'], 
['ABC234', ' Fred Greenside', ' 2345', ' AgHort_Parking'], 
['GH7682', ' Clara Hill', ' 7689', ' AgHort_Parking'], 
['JU9807', ' Jacky Blair', ' 7867', ' Vet_Parking'], 
['KLOI98', ' Martha Miller', ' 4563', ' Vet_Parking'], 
['ADF645', ' Cloe Freckle', ' 6789', ' Vet_Parking'], 
['DF7800', ' Jacko Frizzle', ' 4532', ' Creche_Parking'], 
['WER546', ' Olga Grey', ' 9898', ' Creche_Parking'], 
['HUY768', ' Wilbur Matty', ' 8912', ' Creche_Parking']] 
</code></pre>

<p>Can someone give me hints to convert the above list into dictionary like:</p>

<pre><code>{'EDF768': ' Bill Meyer', ' 2456', ' Vet_Parking'}
</code></pre>
