title: Python - make a dictionary from a csv file with multiple categories
body: <p>I am trying to make a dictionary from a csv file in python, but I have multiple categories. I want the keys to be the ID numbers, and the values to be the name of the items. Here is the text file:</p>
  
  <pre><code>"ID#","name","quantity","price"
  "1","hello kitty","4","9999"
  "2","rilakkuma","3","999"
  "3","keroppi","5","1000"
  "4","korilakkuma","6","699"
  </code></pre>
  
  <p>and this is what I have so far: </p>
  
  <pre><code>txt = open("hk.txt","rU")
  
  file_data = txt.read()
  lst = []           #first make a list, and then convert it into a dictionary.
  for key in file_data:
          k = key.split(",")
          lst.append((k[0],k[1]))
  
  dic = dict(lst)
  print(dic)
  </code></pre>
  
  <p>This just prints an empty list though. I want the keys to be the ID#, and then the values will be the names of the products. I will make another dictionary with the names as the keys and the ID#'s as the values, but I think it will be the same thing but the other way around.</p>